Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.268 ·

Forced (destructive) removal of agent worktrees

Agent worktrees can now be force-removed, deleting all their files after verifying they're linked worktrees, not standalone repos

Under the hood Internal Changes
JSON All of v2.1.268
Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
Agent WorktreesArea: what it touches
Internal ChangesKind: in v2.1.268,
Internal ChangesSection of the release
What

Cleaning up a git worktree used for an agent (a separate working copy of a repository, stored under .claude/worktrees) now supports a forced, destructive removal path. It deletes all files in the worktree directory except a verified .git file, then removes the directory itself. Before doing this, it checks that the target is actually a linked worktree, meaning it has a .git file pointing elsewhere rather than being a standalone repository with its own full history. If the deletion only partially succeeds, the .git gitlink pointer is restored.

Why

This lets Claude Code fully clean up an agent's worktree when needed, while the standalone-repo check guards against accidentally deleting the only copy of a repository's history, and the pointer restoration protects against leaving things in a broken half-deleted state if something goes wrong partway through.

See this entry in the whole of v2.1.268 →

Feedback