What
A worktree is a separate working copy of a repository that Claude Code can work in. Worktree information now carries a worktreeCopy field, and two behaviours use it:
- The text that describes the agent tool now says each result comes back with a "path or label" instead of "a branch and worktree path to merge", when a check (
Lg()) passes. - When a job is deleted,
deleteJobnow treats a worktree as already handled if a new check passes, or if the worktree was made by a mod (worktreeCopy?.madeBy === "mod") and a second check returns nothing. In that case it skips the usual safety checks and does not try to remove the worktree again. Before, every worktree path went through the full safety checks.
Why
This points to a kind of worktree copy that has no branch. In practice it changes how such results are described, and it means Claude Code does not try to delete a mod-made worktree that has already gone when its job is deleted.