{"version":"2.1.330","anchor":"worktree-deletion-skips-a-worktree-that-the-host-already-rem","canonical_anchor":"worktree-copy-field-and-wording-for-non-branch-results","heading":"Worktrees gain a worktreeCopy record, used for wording and deletion","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/worktree-deletion-skips-a-worktree-that-the-host-already-rem","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### Worktrees gain a worktreeCopy record, used for wording and deletion\n\nWorktree info carries a new `worktreeCopy` field, agent results can name a path or label, and mod-made copies already removed are skipped on deletion\n\n**Unclear.** It is not clear exactly which conditions make a worktree count as already handled.\n\n**What**\n\nA 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:\n\n- 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.\n\n- When a job is deleted, `deleteJob` now 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.\n\n**Why**\n\nThis 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.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}