{"version":"2.1.268","anchor":"worktreeremove-hook-result-reporting-overhauled","canonical_anchor":"worktreeremove-hook-result-reporting-overhauled","heading":"WorktreeRemove hook result reporting overhauled","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268\/e\/worktreeremove-hook-result-reporting-overhauled","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.268","markdown":"### WorktreeRemove hook result reporting overhauled\n\nWorktreeRemove hook now reports whether it actually ran, removed the worktree, or failed\n\n**What**\n\nThe `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.\n\n**Why**\n\nThis 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.\n\n- Area: Hooks\n- Names: `WorktreeRemove`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5"}