Claude Code deletes clean worktrees on exit without asking. git worktree lock stops it. A developer found that Claude Code 2.1.263 silently deletes a clean, unnamed worktree and its branch on /exit without prompting, running git worktree unlock, git worktree remove --force, and git branch -D. The cleanup routine only preserves worktrees whose lock reason matches its own internal regex, so re-locking the worktree with a user-set reason via git worktree lock prevents the deletion. The finding was tested on git 2.52.0 on macOS. /exit a claude --worktree