{"version":"2.1.327","anchor":"exitworktree-removal-check-moved-into-permissions","canonical_anchor":"exitworktree-removal-check-moved-into-permissions","heading":"Removing a worktree and discarding its changes now always asks","tier":"notice","area":"Worktrees","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/exitworktree-removal-check-moved-into-permissions","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Removing a worktree and discarding its changes now always asks\n\nRemoving a worktree with discard_changes now goes through a permission prompt and can no longer be approved once for good\n\n**What**\n\nA worktree is a separate working copy of your project that a session can work in. The `ExitWorktree` tool can remove it, and with `discard_changes` it throws away any work in it. That case is now handled more strictly:\n\n- The removal now goes through the permission step and asks you, instead of being checked earlier and refused there.\n\n- If the session has already left the worktree, the call is denied with the message `The session left its worktree before this call ran.`\n\n- Auto mode's safety check now sees the action described as `remove the worktree and discard any work in it`, not only the bare action name.\n\n- An always-allow rule, which would approve the action without asking again, can no longer be used for this case.\n\n**Why**\n\nDeleting a worktree together with its unsaved work cannot be undone, so it now asks each time and cannot be pre-approved permanently.\n\n- Area: Worktrees\n- Names: `discard_changes`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}