Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.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

You'll notice Improvements
JSON All of v2.1.268
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.268,
ImprovementsSection of the release
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
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on Run parallel sessions with worktrees touched a line naming WorktreeRemove after this was published. When you exit an interactive worktree session, Claude checks the worktree for work that removal would delete: changed or untracked files, uncommitted work inside checked-out submodules, and new commits. These rules apply to worktrees Claud… worktrees see the edit
Confirmed since Anthropic's documentation has since written up WorktreeRemove, on Manage multiple agents with agent view. | v2.1.274 | When a [delete is refused](#what-deleting-a-session-removes) because git or your `WorktreeRemove` hook couldn't remove the worktree, a checked-out submodule that Claude Code verifies has no uncommitted changes to tracked files… agent-view see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up WorktreeRemove, on Manage multiple agents with agent view.

See this entry in the whole of v2.1.268 →

Feedback