Evidence record / claude-code
A dated record of one change, kept so the writing that cites it can be checked. Compiled from the sources listed below by the research run, not written for reading. The judgment lives in the issues that cite it, below.
2026-10-24-claude-code-worktree-exit-cleanup-is-repaired-where-it-could-discard-commits
Worktree exit cleanup is repaired where it could discard commits. 301 repairs unprompted exit removal of WorktreeCreate-hook worktrees that might contain unpushed commits. 304 repairs exit cleanup removing a worktree and its branch after detached HEAD or branch changes, potentially losing commits. 309 makes harness-created worktrees and branch checkouts ignore git replace refs.
Channel: tagged-release. Half: defect. Date: 2026-10-22.
Operator consequence: Re-test retention using the team’s actual creation hook, detached HEAD and branch-switch workflow before delegating cleanup. Keep an independent record of important commits. Worktree isolation must include ownership of what survives session exit.
Receipt
Finding metadata
Run: 2026-10-24-weekly-digest-2026-10-13_2026-10-24-frontier-v0
Finding ID: 2026-10-24-claude-code-worktree-exit-cleanup-is-repaired-where-it-could-discard-commits
Profile citations
- Claude Code / claim / worktree-cleanup-retention
- Claude Code / posture / governance
Source links
Primary links, including exact changelog lines when available.
- github release2026-10-24-claude-code-worktree-exit-cleanup-is-repaired-where-it-could-discard-commitsanthropics/claude-code / v2.1.301github release2026-10-24-claude-code-worktree-exit-cleanup-is-repaired-where-it-could-discard-commitsanthropics/claude-code / v2.1.304github release2026-10-24-claude-code-worktree-exit-cleanup-is-repaired-where-it-could-discard-commitsanthropics/claude-code / v2.1.309
Versioned source: run artifact