[VS Code] Can't continue a session in the worktree it moved into via EnterWorktree ("history can't be opened here")

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 24, 2026

Summary

When a session moves itself into a git worktree (EnterWorktree), there is no way to continue it from a VS Code window opened on that worktree. Trying to resume it there fails with:

This Remote Control session's history can't be opened here. Continue it on claude.ai, or in the terminal, editor or app where it was started.

The only window that can continue the session is the one on the main checkout. In practice that window can't be used to review or test the worktree's changes.

Scenario

  1. In VS Code, with the repo's main checkout open, I ask Claude to do some work.
  2. Along the way Claude decides it needs a worktree. In my case a skill-driven plan/execute workflow called EnterWorktree, and Claude created ../worktrees/<name> on a new branch. I didn't ask for the worktree and didn't know one would be needed.
  3. I open the worktree in a new VS Code window so I can review and run the changes.
  4. In that window I try to resume the session so I can discuss the changes with the context it already has. I get the error above.

The same session _can_ be continued from the Claude mobile app through Remote Control. From the user's side it's confusing that my phone can continue the session but a VS Code window on the same machine can't.

Why the workarounds don't work

  • Continue in the original window. The session is working in the worktree, but that window is on the main checkout. Its Explorer, file quick-open, search, run/debug configurations and tasks all point at the main checkout, not the worktree.
  • A multi-root workspace containing the worktrees folder. Source Control shows the worktree's changes, but quick-open, run/debug and the rest of the tooling still assume the primary folder. In practice a worktree only works properly when it's the folder the window has open.
  • Start the work in the worktree's window from the beginning. Not possible: Claude creates the worktree partway through a session, when it decides one is needed.
  • Start a new session in the worktree window. This works, but the new session doesn't have the conversation that produced the changes, which is exactly what I need to review them.

What I observed

  • Session history is stored under ~/.claude/projects/<encoded start directory>/<session-id>.jsonl. The session stays under the main checkout's folder even after EnterWorktree.
  • The worktree window reads from the worktree's own history folder, which doesn't contain the session.
  • The resume picker in the worktree window still lists the session, probably through Remote Control, but then refuses to open it.

Request

A supported way to continue a session in a window or terminal opened on the worktree it moved into. Any of these would help:

  1. Resume from any directory, as long as the session's history is on the local machine. Or at least allow it when the new directory is a worktree the session entered.
  2. After EnterWorktree in the VS Code extension, offer to open the worktree in a new window and hand the session over to it.
  3. A command or CLI flag to move or fork a session into another directory, for example claude --resume <id> --cwd <worktree>.

Related but different: #30906 (the worktree cwd isn't restored on resume).

Environment

  • Claude Code CLI 2.1.281, VS Code extension 2.1.280
  • VS Code 1.138.0
  • macOS 27.0 (arm64)
  • Remote Control enabled

View original on GitHub ↗