You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
Bug FixesKind: in v2.1.311,
Bug FixesSection of the release
What
A worktree is a separate working copy of your project that an agent can use so its changes stay apart from yours. When an agent finishes, Claude Code cleans up its worktree. Before removing it, Claude Code now checks whether another task is still working in that directory. This covers both tasks that are running and tasks that are parked.
If another task is still using it, the worktree is kept and Claude Code logs which task is using it.
The worktree stays reserved until no running task is left in it.
If the session was handed off with /background, the reservation stays in place.
Before this change, a clean worktree was removed without checking whether any other task was using it.
Why
This stops Claude Code from deleting a folder while another task is still working in it. Before, a background or parked task could find its working directory gone.