[BUG] `--worktree` flag: Claude freezes at "Removing worktree…" on exit
Resolved 💬 3 comments Opened Mar 11, 2026 by sakaritoru Closed Mar 14, 2026
Bug description
When exiting a Claude Code session started with the --worktree flag, the process hangs indefinitely at the "✻ Removing worktree…" step. It never completes and requires a force kill (Ctrl+C or kill the process) to exit.
Steps to reproduce
- Start Claude Code with
claude --worktreein a git repository - Perform some work in the session
- Exit the session (e.g.,
/exitor Ctrl+C) - Observe the output freezes at:
````
✻ Removing worktree…
- The process never returns to the shell
Expected behavior
The worktree should be cleaned up and the process should exit normally.
Environment
- Claude Code version: 2.1.72
- OS: macOS 26.2 (Darwin 25.2.0)
- Shell: zsh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗