{"version":"2.1.331","anchor":"worktree-registration-drop-now-moves-the-entry-aside-first-o","canonical_anchor":"worktree-registration-drop-now-moves-the-entry-aside-first-o","heading":"Stale worktree entries are moved aside before removal on Linux and WSL","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/worktree-registration-drop-now-moves-the-entry-aside-first-o","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Stale worktree entries are moved aside before removal on Linux and WSL\n\nOn Linux and WSL, Claude Code now moves a stale worktree entry aside and checks it before emptying it, instead of deleting it in place\n\n**What**\n\nA git worktree is an extra working folder tied to the same repository, and git keeps a record of each one. When Claude Code removes the record of a worktree that no longer exists, on Linux and WSL it now:\n\n- Renames the record into a `worktrees\/claude-dropped-*` folder.\n\n- Checks that the moved folder is the one it meant to remove.\n\n- Empties it there.\n\nBefore, it deleted the record in place. Claude Code now shows a warning if the move fails because the target is on a different filesystem (the EXDEV error), or if the entry changed before it could be removed.\n\n**Why**\n\nCommands running in the sandbox, a restricted environment Claude Code uses to run commands safely, could still be using the worktree. Moving the entry first avoids a timing clash where a running command and the cleanup touch the same files at once.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}