{"version":"2.1.336","anchor":"worktree-creation-can-reuse-a-pre-populated-lock-via-a-new-f","canonical_anchor":"worktree-creation-can-reuse-a-pre-populated-lock-via-a-new-f","heading":"Worktree creation can lock the worktree and skip the initial file checkout","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/worktree-creation-can-reuse-a-pre-populated-lock-via-a-new-f","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Worktree creation can lock the worktree and skip the initial file checkout\n\nIn some cases Claude Code now creates worktrees locked and without checking out files at first, and its stale-lock fix matches more locks\n\n**Unclear.** It is not clear exactly what decides when this new route is used.\n\n**What**\n\nA worktree is a second working copy of a git repository in its own folder. When Claude Code creates one, it can now ask git to lock the new worktree and record a reason, and to skip checking out files at first. It does this only in certain cases: when sparse checkout is not in use and the branch already exists. Before, worktrees were never created locked.\n\nThe step that cleans up stale locks now removes a suffix from a lock before comparing it, so it can match more of them.\n\nFetching a pull request for a worktree works the same way as before.\n\n**Why**\n\nThis is likely to make creating a worktree faster.\n\n- Flag `tengu_melodic_octopus`: Not enough to say (read for one account on one subscription tier against v2.1.336; this account: no value returned, anonymous baseline: no value returned, compiled default: on) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}