{"version":"2.1.333","anchor":"worktree-creation-refused-when-the-shell-is-outside-the-sess","canonical_anchor":"worktree-creation-refused-when-the-shell-is-outside-the-sess","heading":"Worktrees are refused when the shell is outside the session's folders","tier":"notice","area":"Worktrees","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/worktree-creation-refused-when-the-shell-is-outside-the-sess","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Worktrees are refused when the shell is outside the session's folders\n\nClaude Code now refuses to create a worktree when the shell is outside the session's working folders, or in a repository the session only partly holds\n\n**Unclear.** It is not clear whether the switch for the second check is on.\n\n**What**\n\nA worktree is a second copy of a git repository checked out in its own folder. Claude Code now refuses to create one in two cases:\n\n- The shell is in a folder outside the session's working folders.\n\n- The shell is in a repository that the session only holds part of. The message says: \"A worktree would open that repository's whole git folder to writes, so no worktree was made.\"\n\nThe second check is behind a switch.\n\n**Why**\n\nThis is a new guard on creating worktrees. Creating one could open a whole repository's git folder to changes, beyond the folders the session was given.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}