claude-code - 💡(How to fix) Fix Worktree Name Update & Fetch Issue (EnterWorktree tool reports success but Claude Code session doesn't actually switch to the new worktree)

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Code Example

When using the EnterWorktree tool to create or switch to a worktree, the tool reports success and the underlying shell/git commands confirm the directory and branch have changed. However, the Claude Code UI (branch indicator, worktree sidebar) continues to show the original/previous worktree and never updates to reflect the actual working directory change.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code UI remains stuck on the previous worktree name even though the session shell has successfully switched. Attempting to exit and re-enter the worktree by path doesn't resolve the UI sync issue.

I ask Claude Code to rename that weirdly named worktree to something rational, it says it does but the app view it stays the same. so confusing.

What Should Happen?

Claude Code UI should update to show the current worktree name and branch that the session is actually in, matching what pwd and git branch report.

Error Messages/Logs

When using the EnterWorktree tool to create or switch to a worktree, the tool reports success and the underlying shell/git commands confirm the directory and branch have changed. However, the Claude Code UI (branch indicator, worktree sidebar) continues to show the original/previous worktree and never updates to reflect the actual working directory change.

Steps to Reproduce

  1. Create a new worktree using EnterWorktree with name parameter
  2. Tool returns: "The session is now working in the worktree"
  3. Verify with pwd and git branch — both show correct new worktree
  4. Check Claude Code UI — still shows old worktree name in branch indicator

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.6608.0 (f65729) 2026-05-07T14:16:09.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="626" height="172" alt="Image" src="https://github.com/user-attachments/assets/4d87133a-3be9-4d50-8dc6-c6002c766883" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING