TL;DR If you /exit a claude --worktree <name> session with no uncommitted changes and no new commits , Claude Code removes the worktree and its branch without showing the Keep/Remove dialog. This is documented behavior, not a bug. There is no setting to turn it off.

Source: [Dev.to](https://dev.to/day_b3fa2204948ded3059f6f/claude-code-deletes-clean-worktrees-on-exit-without-asking-git-worktree-lock-stops-it-ej)

Sponsored