{"version":"2.1.331","anchor":"new-claude-code-lazy-worktree-env-var","canonical_anchor":"new-claude-code-lazy-worktree-env-var","heading":"New CLAUDE_CODE_LAZY_WORKTREE variable turns off a worktree behaviour","tier":"use","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/new-claude-code-lazy-worktree-env-var","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### New `CLAUDE_CODE_LAZY_WORKTREE` variable turns off a worktree behaviour\n\nSetting `CLAUDE_CODE_LAZY_WORKTREE` to anything now turns off one worktree behaviour that otherwise runs when other conditions hold\n\n**Unclear.** It is not clear what the worktree behaviour does, so what setting `CLAUDE_CODE_LAZY_WORKTREE` changes is unknown.\n\n**What**\n\nClaude Code now recognises an environment variable (a setting you put in your shell before starting it) called `CLAUDE_CODE_LAZY_WORKTREE`. A worktree is a separate working copy of your git repository that Claude Code can create. One worktree behaviour runs only when several conditions hold and this variable is not set. Setting it, to any value, turns that behaviour off. The variable is also passed on to processes Claude Code starts.\n\nTwo other variable names now appear:\n\n- `CLAUDE_CODE_DISABLE_SHIP`, listed with the other `CLAUDE_CODE_DISABLE_*` switches\n\n- `CLAUDE_GATEWAY_ALLOW_LOOPBACK`, which one part of Claude Code now reads\n\n**Why**\n\nThis is an opt-out for a worktree behaviour. The name suggests that behaviour delays creating the worktree until it is needed.\n\n- Area: Worktrees\n- Names: `CLAUDE_CODE_LAZY_WORKTREE`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}