Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.274 ·

Worktree keep/reap dirty-check reworked around .git existence

Worktree cleanup now checks whether the .git file still exists before assuming a worktree is safe to remove

TierUnder the hoodhow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaGit Worktreeswhat it touches
KindBug Fixesin v2.1.274,
Under the hood

Worktree cleanup now checks whether the .git file still exists before assuming a worktree is safe to remove

What

The internal function that decides whether to keep or discard a git worktree (a separate working copy of a repository) now checks whether the worktree's .git file still exists before treating it as clean. Previously, the fast path assumed a worktree was clean whenever it had no recorded head commit, without this check.

Why

This avoids incorrectly treating a worktree as safe to discard just because its head commit info is missing, reducing the risk of losing work in edge cases where the worktree's git link is in an unusual state.

See this entry in the whole of v2.1.274 →