Agents: Need a way to heal broken worktree paths

Open
#321,878 0 comments 0 reactions 1 assignee View on GitHub

@alexdima is already working on this.

Since Jun 18, 2026.

Assessment

This issue has not been assessed yet.

Description

agents-window feature-request

The agents window needs a way to "heal" the scenario when the path to a worktree for an active session is changed / broken.

To recreate:

  1. Make a new workspace at ~/projects-a/workspace-1
  2. Start a new worktree-based chat session using workspace-1
  3. Go back to new chat screen
  4. Rename the parent "projects-a" folder to "projects-b"
  5. Select the chat session you kicked off a minute ago
  6. See error notification

Core problem: The original chat session is backed by a worktree located at ~/projects-a/workspace-1.worktrees/name-of-session/. When we renamed projects-a to projects-b we broke that path and now agents window sees the worktree as not existing anymore. This in turn ruins your ability to keep working on that chat session.

We need a way to tell the agents window "oops, the worktree for this session is now located at ~/projects-b/workspace-1.worktrees/name-of-session/"

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.