{"version":"2.1.290","anchor":"agent-worktree-removal-reports-non-git-failures","canonical_anchor":"agent-worktree-removal-reports-non-git-failures","heading":"Clearer messages when an agent's worktree cannot be removed","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290\/e\/agent-worktree-removal-reports-non-git-failures","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290","markdown":"### Clearer messages when an agent's worktree cannot be removed\n\nWhen cleaning up an agent's worktree fails, Claude Code now says whether its own deletion failed or git refused, and keeps the worktree\n\n**What**\n\nA worktree is a separate working copy of a git repository that Claude Code can set up for an agent (a helper that works on a task on its own). When Claude Code tries to clean one up and cannot, it now tells two cases apart:\n\n- Claude Code's own attempt to delete the files failed\n\n- git refused to remove the worktree\n\nIn both cases the worktree is left in place, and the message now reads \"removal failed, kept\" instead of always blaming `git worktree remove`. A failed delete is recorded as its own kind of failure.\n\n**Why**\n\nWhen cleanup goes wrong, the message now points at the step that actually failed, which makes it easier to work out what to fix.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}