[BUG] claude --worktree stalls/hangs indefinitely when launched from the default branch (macOS 26.3)
Resolved 💬 2 comments Opened Mar 9, 2026 by arnemortenw Closed Mar 9, 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?
Running claude --worktree (or claude -w) from the default branch (development) causes Claude Code to hang indefinitely. The session never starts. The only way out is to kill the process manually (Ctrl+C).
Environment
- OS: macOS 26.3
- Shell: zsh
- Claude Code version: 2.1.71
- Default branch name:
development(notmainormaster)
Workaround
Manually create the worktree via git and launch Claude inside it:
git worktree add .claude/worktrees/my-feature -b my-feature development
cd .claude/worktrees/my-feature && claude
Related Issues
- #27466 —
--worktreesilently fails on detached HEAD (jj repos)
What Should Happen?
Expected Behavior
A new git worktree should be created branching from development and Claude should start a session inside it.
Actual Behavior
The process hangs indefinitely. No worktree is created. Must be killed manually.
Steps to Reproduce
- Have a git repo with
developmentas the default/main branch checked out - Run
claude --worktreefrom that branch - Observe: process stalls, no worktree is created, session never starts
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.71
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗