Worktree flag hangs silently with branch names containing slashes
Resolved 💬 4 comments Opened Mar 24, 2026 by guilhermerodz Closed Apr 18, 2026
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
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗