Worktree Name Update & Fetch Issue (EnterWorktree tool reports success but Claude Code session doesn't actually switch to the new worktree)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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
- Create a new worktree using EnterWorktree with name parameter
- Tool returns: "The session is now working in the worktree"
- Verify with
pwdandgit branch— both show correct new worktree - 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" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗