Worktree flag silently hangs when name contains slash
Resolved 💬 3 comments Opened Mar 24, 2026 by guilhermerodz Closed Mar 28, 2026
Description
When using the -w / --worktree flag with a name containing / (slash), Claude Code silently hangs after completing auth/telemetry. The TUI never launches, no error message is shown, and the process must be killed with Ctrl+C.
Steps to reproduce
claude -w 'rodz/open-8749-implement-directory-sync-mapping-with-no-access-groups'
Expected behavior
Either:
- The worktree launches successfully (as it did in previous versions ~1 week ago)
- A clear validation error like "worktree names cannot contain /"
Actual behavior
- OAuth token request completes
- Telemetry is sent to Anthropic and Datadog
- Process hangs indefinitely with blank terminal output
- No error message
- Must Ctrl+C to exit
Debug output
Running with DEBUG=* shows the auth and telemetry requests complete successfully, but the session never starts:
follow-redirects options { ... protocol: 'https:', path: '/v1/oauth/token', method: 'POST', hostname: 'platform.claude.com' ... }
follow-redirects options { ... path: '/api/event_logging/v2/batch', hostname: 'api.anthropic.com' ... }
follow-redirects options { ... path: '/api/v2/logs', hostname: 'http-intake.logs.us5.datadoghq.com' ... }
Then nothing — no further output.
Workaround
Using dashes instead of slashes in the worktree name works fine:
claude -w 'rodz-open-8749-implement-directory-sync-mapping-with-no-access-groups'
Environment
- Claude Code version: 2.1.81
- OS: macOS Darwin 24.1.0
- Shell: zsh
Notes
This worked with slash-containing worktree names approximately one week ago. The regression likely occurred in a recent update.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗