{"version":"2.1.333","anchor":"worktree-creation-refuses-an-unsafe-repository-root","canonical_anchor":"worktree-creation-refuses-an-unsafe-repository-root","heading":"Worktree creation now checks the repository location is safe","tier":"notice","area":"Worktrees","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/worktree-creation-refuses-an-unsafe-repository-root","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Worktree creation now checks the repository location is safe\n\nCreating a worktree now runs a safety check on the repository and worktree location before and after fetching and adding it\n\n**What**\n\nA worktree is a separate working copy of a git repository. When Claude Code creates one, it now runs a check before and after fetching and adding it, and refuses if the repository or worktree location is unsafe or has been swapped part-way through.\n\n**Why**\n\nWorktree creation is harder to trick into writing somewhere it should not.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}