{"version":"2.1.331","anchor":"stale-agent-worktree-cleanup-is-skipped-under-some-condition","canonical_anchor":"stale-agent-worktree-cleanup-is-skipped-under-some-condition","heading":"Cleanup of old agent worktrees can now be skipped","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/stale-agent-worktree-cleanup-is-skipped-under-some-condition","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Cleanup of old agent worktrees can now be skipped\n\nClaude Code's cleanup of leftover agent worktrees now stops early in some situations instead of always running\n\n**Unclear.** Which settings and conditions make the cleanup skip is not known.\n\n**What**\n\nClaude Code clears out old worktrees (separate working copies of your repository) that its agents left behind. This cleanup used to run every time. It now stops early when certain settings and conditions are met.\n\n**Why**\n\nOld agent worktrees may stay on disk in more cases than before.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}