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.268 ·

WorktreeRemove hook result reporting overhauled

WorktreeRemove hook now reports whether it actually ran, removed the worktree, or failed

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaHookswhat it touches
KindImprovementsin v2.1.268,
You'll notice

WorktreeRemove hook now reports whether it actually ran, removed the worktree, or failed

What

The WorktreeRemove hook, which can run when a worktree is being removed at session exit, when a subagent finishes, or when you delete a background session, now returns a structured result instead of a simple yes/no: not_configured, removed, or failed, each with a summary. If the hook reports failure or gives no output but the worktree directory is confirmed gone anyway, Claude Code now treats the removal as successful rather than reporting a failure.

Why

This gives clearer feedback about what actually happened during worktree removal, and avoids reporting a false failure when the hook didn't report cleanly but the worktree was in fact removed.

Read from
Names in the bundleWorktreeRemove

See this entry in the whole of v2.1.268 →

Feedback