Claude Code deletes clean worktrees on exit without asking. git worktree lock stops it.
This story is from 2026-09-11. It is preserved in the archive; the latest stories are on the live feed.
TL;DR If you /exit a claude --worktree 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. Claude Code holds its own git worktree…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-09-11 23:12 · DEV Community — AI
Claude Code deletes clean worktrees on exit without asking. git worktree lock stops it.