{"version":"2.1.312","anchor":"worktreeremove-hook-untrusted-workspace-leaves-the-tree-in","canonical_anchor":"worktreeremove-hook-untrusted-workspace-leaves-the-tree-in","heading":"Removing a worktree in an untrusted folder no longer reports success","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312\/e\/worktreeremove-hook-untrusted-workspace-leaves-the-tree-in","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312","markdown":"### Removing a worktree in an untrusted folder no longer reports success\n\nIf no `WorktreeRemove` hook runs because the folder is untrusted and the worktree still exists, removal now reports a failure\n\n**What**\n\nA worktree is a separate working copy of your project. A hook is a command you configure to run at a certain moment. A `WorktreeRemove` hook runs when a worktree that a `WorktreeCreate` hook created is being removed.\n\nIf no `WorktreeRemove` hook runs because the folder is not trusted, and the worktree is still there, Claude Code now reports a failure with this message: \"left the tree in place (workspace not trusted, so the folder's own hooks did not run)\". Before, it reported the worktree as removed.\n\n**Why**\n\nWorktrees from untrusted folders are no longer reported as removed when they are actually still on disk.\n\n- Area: Hooks\n- Names: `WorktreeRemove`, `WorktreeCreate`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}