Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.274 ·

Worktree removal now checks for uncommitted submodule work

Claude Code now checks git submodules before deleting a worktree, and warns when submodule state can't be fully verified

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaGit Worktreeswhat it touches
KindImprovementsin v2.1.274,
Group of 5 You'll notice

Claude Code now checks git submodules before deleting a worktree, and warns when submodule state can't be fully verified

What

  • Removing a git worktree (for example via the claude rm or ctrl+x flow, or automatic agent-worktree/job cleanup) now checks for work inside submodules, not just the top-level worktree. A new submoduleWork concept distinguishes "unverifiable" submodule state (such as a nested repo or an unconfigured gitlink) from ordinary uncommitted "changes" inside a submodule.
  • When submodule work is unverifiable or has changes, worktree removal now refuses to proceed and shows a message naming the issue explicitly, with tailored explanatory text and follow-up instructions for each case; job deletion can likewise keep a worktree around for this reason.
  • The confirmation dialog shown before discarding uncommitted changes in a worktree now separately calls out submodule work that a plain git status in the worktree wouldn't reveal.
  • Before counting changes, the "exit worktree" confirmation dialog now also checks the worktree's git configuration for unsafe settings (such as conditional includes or custom LFS transfer agents); if the worktree can't be safely read, it shows a generic "uncommitted files that could not be counted" warning instead of a count, and checks submodules via a --submodule=short diff, adding a warning line if a submodule can't be checked.
  • The JSON snapshot of git worktree state sent over the remote bridge now includes a submodules_unverified field alongside existing fields like head_sha, unpushed_count, and is_dirty.

Why Submodule changes don't always show up in a normal git status of the parent worktree, so without these checks a worktree could be deleted while it still held uncommitted or unverifiable work inside a submodule. This makes worktree removal safer and more transparent about what it could and couldn't verify.

See this entry in the whole of v2.1.274 →

Feedback