[BUG] `claude --worktree` hangs forever for a worktree with a bare repository
Status Fixed / completed
Reported on v2.1.50
Maintainer reply None cached
Activity 4 comments · opened Feb 21, 2026 · closed Apr 5, 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?
claude --worktree hangs forever in a worktree with a bare repository.
It does execute normally in a worktree with a non-bare repository.
What Should Happen?
As the help says:
Create a new git worktree for this session (optionally specify a name)
Error Messages/Logs
_Nothing_
Steps to Reproduce
- Unzip bare-wt-setup.zip
cdtoworktree-a- Execute
claude --worktree
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.50
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
4 Comments
I've also had the same trouble, updated git
In an empty directory with only a
git inittheclaude --worktreecommand hangs forever and doesn't launch. I've confirmed no plugins, no mcp added, and sandbox mode isn't on. I've also attempted withclaude -w attempt1 --dangerously-skip-permissionsto no avail as wellNot stale
Now it prints
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.