{"version":"2.1.335","anchor":"worktree-removal-keeps-worktree-if-new-work-appeared","canonical_anchor":"worktree-removal-keeps-worktree-if-new-work-appeared","heading":"Removing a worktree on exit now keeps it if new work appeared in the meantime","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.335\/e\/worktree-removal-keeps-worktree-if-new-work-appeared","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.335","markdown":"### Removing a worktree on exit now keeps it if new work appeared in the meantime\n\nChoosing remove in the exit dialog now rechecks the worktree and keeps it, with a message, if it holds new work\n\n**What**\n\nA worktree is a separate working copy of your repository that Claude Code can work in. When you leave, a dialog asks whether to keep or remove it. Choosing remove now checks the worktree again first. If it holds new work, Claude Code keeps it and tells you to check it before removing it.\n\nBefore, removal went ahead based on the check made when the dialog opened.\n\n**Why**\n\nThis stops Claude Code from deleting changes that were made after the dialog appeared.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}