{"name":"WorktreeRemove","slug":"worktreeremove","family":"hook","title":"Hook events","noun":"hook event","description":"When a worktree that a `WorktreeCreate` hook created is being removed","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.50","released_at":"2026-02-20 23:09:38","spans":3}},"aliases":[],"entries":[{"version":"2.1.284","anchor":"claude-remote-control-help-notes-updated","heading":"claude remote-control --help now describes the trust prompt and worktree needs","line":"The `claude remote-control` help no longer says to run `claude` first to trust a folder, and notes what worktree mode needs","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.268","anchor":"claude-rm-gains-a-force-remove-worktree-flag-and-rich","heading":"claude rm gains a --force-remove-worktree flag and rich refusal messages","line":"`claude rm` gets a `--force-remove-worktree` flag and much more detailed refusal messages","released_at":"2026-09-10 18:41:11","reason":"found in this entry's text"},{"version":"2.1.268","anchor":"new-claude-rm-subcommand-flags-for-background-sessions","heading":"New 'claude rm' subcommand flags for background sessions","line":"claude rm gains --discard-unpushed and --force-remove-worktree flags for cleaning up background session worktrees","released_at":"2026-09-10 18:41:11","reason":"found in this entry's text"},{"version":"2.1.268","anchor":"worktreeremove-hook-result-reporting-overhauled","heading":"WorktreeRemove hook result reporting overhauled","line":"WorktreeRemove hook now reports whether it actually ran, removed the worktree, or failed","released_at":"2026-09-10 18:41:11","reason":"found in this entry's text, named in this entry"},{"version":"2.1.265","anchor":"new-hook-events-worktreecreate-worktreeremove-now-gate-fe","heading":"New hook events: WorktreeCreate \/ WorktreeRemove now gate feature availability via eE()","line":"Worktree create\/remove UI now also checks a broader capability gate, not just whether hooks are registered","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text, named in this entry"},{"version":"2.1.242","anchor":"worktree-cleanup-passes-account-state-to-the-removal-hook","heading":"Worktree cleanup passes account state to the removal hook","line":"Worktree removal now passes account state to your WorktreeRemove hook and the record-clearing call.","released_at":"2026-08-24 19:16:14","reason":"found in this entry's text"},{"version":"2.1.187","anchor":"worktreeremove-hook-fallback-now-logged","heading":"WorktreeRemove hook \u2014 fallback now logged","line":null,"released_at":"2026-06-23 17:55:41","reason":"found in this entry's text"},{"version":"2.1.92","anchor":"bug-fixes","heading":"","line":null,"released_at":"2026-04-04 00:05:59","reason":"found in this entry's text"},{"version":"2.1.50","anchor":"vcs-agnostic-worktree-isolation-via-hooks","heading":"VCS-Agnostic Worktree Isolation via Hooks","line":null,"released_at":"2026-02-20 23:09:38","reason":"found in this entry's text"}],"entries_total":9,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false},{"source":"claude-code","path":"worktrees","title":"Run parallel sessions with worktrees","documented":false}],"docs_total":8,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/worktreeremove","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}