Worktree flag hangs silently with branch names containing slashes
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 4 comments · opened Mar 24, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Description
Using the -w / --worktree flag with a branch name containing / causes Claude Code to hang silently — no output, no error. The process must be killed with Ctrl+C.
Replacing / with - in the same branch name works fine.
This was working correctly until recently (as of ~2026-03-23).
Steps to reproduce
# Hangs silently — no output, no error
claude -w "rodz/open-9825-prevent-inconsistencies-when-changing-themes-at-preferences"
# Works fine
claude -w "open-9825"
# Also works (slash replaced with dash)
claude -w "rodz-open-9825-prevent-inconsistencies-when-changing-themes-at-preferences"
Expected behavior
Claude Code should either:
- Create/enter the worktree normally (as it did before), or
- Show a clear error message if the branch name is invalid
Additional context
- Other worktrees with
/in the name already exist in the.worktreesdirectory and were created successfully in prior sessions - OS: macOS (Darwin 24.1.0)
- This is a regression —
/in worktree names worked until recently
4 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Has been fixed!!
https://code.claude.com/docs/en/changelog#2-1-83
This was fixed in v2.1.83 —
--worktreewith a branch name containing/now works instead of hanging silently. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.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.