[BUG] Git Worktree is totaly broken
Resolved 💬 6 comments Opened Feb 26, 2026 by David-Hodeffi-Forter Closed May 18, 2026
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?
Using git worktree is broken, claude use his tooling to execute/search/bash on the 'main/master' git branch instead of the worktree branch which result in mis understanding of the real code that was changed.
What Should Happen?
claude code should be isolated only to the worktree with all the tooling.
Error Messages/Logs
Steps to Reproduce
claude -w my-git-branch
than use planning/execution on this worktree results with searching across the all folder and not at .claude/worktree/my-git-branch.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗