claude --worktree hangs indefinitely on macOS

Resolved 💬 4 comments Opened Mar 23, 2026 by twocatsdev Closed Apr 22, 2026

Description

claude --worktree <name> hangs indefinitely with no output on macOS. The process never starts — no prompt, no error, no debug output even with --debug.

Environment

  • Claude Code version: 2.1.81
  • OS: macOS (Darwin 25.3.0)
  • Shell: zsh (init time ~0.6s)
  • Node: v22.14.0

Steps to Reproduce

  1. Run claude --worktree test123
  2. Observe: hangs with blank screen, no output

Also tried:

  • claude --worktree test123 --debug — same hang, no debug output
  • Different worktree names (with/without slashes)
  • With and without hooks configured
  • With 51 existing git worktrees and after reducing to 3 — same behavior

What Works

  • claude (without --worktree) starts normally
  • git worktree add completes in ~1s
  • zsh -i -c 'echo done' completes in ~0.6s
  • Agent tool with isolation: "worktree" works perfectly from within a Claude Code session — worktree is created, session runs, results returned

Expected Behavior

claude --worktree <name> should create a worktree and start an interactive session.

Actual Behavior

Process hangs indefinitely with no output. Must be killed with Ctrl+C.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗