[BUG] EnterWorktree rebinds session cwd correctly, but Desktop side-panel branch indicator doesn't update

Resolved 💬 3 comments Opened May 1, 2026 by richburdon Closed May 5, 2026

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

  1. Open Claude Code Desktop on a project on the main branch.
  2. In a session, ask Claude to call EnterWorktree with a valid name (e.g. name: "my-test").
  3. The tool succeeds with: Created worktree at .claude/worktrees/my-test on branch worktree-my-test. The session is now working in the worktree.
  4. Check the side-panel branch indicator: it still shows the original branch (main ← main), not worktree-my-test.

Verification That the Binding Itself Is Correct

This is a UI/rendering issue, not a binding issue:

  • pwd in the session returns the worktree path.
  • git branch --show-current returns worktree-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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗