[BUG] EnterWorktree rebinds session cwd correctly, but Desktop side-panel branch indicator doesn't update
Description
When EnterWorktree is called in a Claude Code Desktop session, the session's working directory correctly rebinds to the new worktree, but the side-panel branch indicator in the Desktop UI does not reflect this change. The indicator continues to display the original branch of the directory the Desktop window was opened on (e.g. main ← main) instead of the new worktree branch.
Steps to Reproduce
- Open Claude Code Desktop on a project on the
mainbranch. - In a session, ask Claude to call
EnterWorktreewith a validname(e.g.name: "my-test"). - The tool succeeds with:
Created worktree at .claude/worktrees/my-test on branch worktree-my-test. The session is now working in the worktree. - Check the side-panel branch indicator: it still shows the original branch (
main ← main), notworktree-my-test.
Verification That the Binding Itself Is Correct
This is a UI/rendering issue, not a binding issue:
pwdin the session returns the worktree path.git branch --show-currentreturnsworktree-my-test.- Files written by the session land in the worktree, not the original directory.
- Subsequent tool calls (Bash, Edit, Write) all operate on the worktree.
Only the side-panel label is wrong.
Expected Behavior
The side-panel branch indicator should update to display the new worktree branch after EnterWorktree successfully binds the session — same as it would if the Desktop window had been opened on that path directly.
Impact
Users cannot tell at a glance whether the harness has actually bound to a worktree. The out-of-sync UI contradicts the tool's success message and creates confusion about whether subsequent edits are on main vs. a worktree branch.
Environment
- Claude Code Desktop
- macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗