vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Default worktree location has no write permission in dev container

Open rebornix opened this issue 1 month ago • 2 comments

Does this issue occur when all extensions are disabled?: N/A

  • Open a repo/folder in dev container, e.g., vscode-copilot-chat
  • Start a CLI session with isolation
  • :bug: The default worktree folder is /workspaces/vscode-copilot-chat.worktree which the process has no write permission to, thus it failed

Not sure what's the right default we can suggest users to use in dev container env. @lszomoru @chrmarti

rebornix avatar Nov 16 '25 23:11 rebornix

@chrmarti, what would be the right thing to do here?

lszomoru avatar Nov 17 '25 07:11 lszomoru

The default is to only mount /workspaces/vscode-copilot-chat on the local filesystem. So if we changed permissions to allow the creation of /workspaces/vscode-copilot-chat.worktree, that would be within the container and it would be deleted together with the container which might be unexpected and cause data loss.

We could mount the workspace's parent folder as /workspaces, but that would make all other files and folders available in the container, so we should probably not do it automatically.

Or we could mount the local vscode-copilot-chat.worktree if it exists as /workspaces/vscode-copilot-chat.worktree, but that wouldn't work if that worktree folder does not exist yet locally.

chrmarti avatar Nov 17 '25 17:11 chrmarti