{"version":"2.1.304","anchor":"worktree-exit-tool-checks-the-branch-and-nested-worktrees","canonical_anchor":"worktree-exit-tool-checks-the-branch-and-nested-worktrees","heading":"Removing a worktree now tells apart commits on its current branch and a kept branch","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304\/e\/worktree-exit-tool-checks-the-branch-and-nested-worktrees","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304","markdown":"### Removing a worktree now tells apart commits on its current branch and a kept branch\n\nExitWorktree now separates commits on a worktree's current branch from commits on a kept branch, and can refuse removal until you confirm\n\n**What**\n\nA worktree is a separate copy of your project checked out in its own folder. ExitWorktree is the tool Claude uses to leave one, and it can remove the worktree as it goes.\n\nWhen asked to remove a worktree, ExitWorktree now tells apart commits on the branch the worktree is currently on from commits on a branch that is being kept. If the worktree has moved to another branch since it was made, it now says so. It can refuse the removal in more cases, and when it does it tells Claude to confirm with you before trying again with `discard_changes: true`.\n\nA check for worktrees nested inside the one being removed is also present, but it does not do anything yet in this build.\n\n**Why**\n\nThe more precise checks make it less likely that work is lost by accident when a worktree is removed.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}