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.
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 sinceA 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…worktreessee the edit
Confirmed sinceAnthropic'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-viewsee 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.