{"version":"2.1.309","anchor":"windows-sandbox-prompt-gains-git-safety-guidance","canonical_anchor":"windows-sandbox-prompt-gains-git-safety-guidance","heading":"Claude now avoids repository-breaking git commands in the Windows sandbox","tier":"notice","area":"Windows","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309\/e\/windows-sandbox-prompt-gains-git-safety-guidance","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309","markdown":"### Claude now avoids repository-breaking git commands in the Windows sandbox\n\nOn Windows, the sandbox guidance tells Claude not to init, clone or add worktrees with git there, and that sandboxed git cannot use your saved sign-in\n\n**What**\n\nThe sandbox is a restricted environment that Claude Code can run shell commands in. On Windows, the instructions Claude reads about the sandbox for its `Bash` tool (the tool it uses to run shell commands) now include git guidance:\n\n- Do not run `git init`, `git clone` or `gh repo clone` in the sandbox. Your own git would then refuse the repository with a \"detected dubious ownership\" error.\n\n- Do not run `git worktree add` in the sandbox, even when you ask for a worktree.\n\n- Sandboxed git cannot use your saved sign-in over HTTPS or SSH.\n\n- When Claude Code is started in a subfolder of a repository, sandboxed commands cannot write to the `.git` folder above the working directory.\n\nBefore this, the list only covered empty placeholder files.\n\n**Why**\n\nOn Windows, Claude will now decline to create or clone repositories inside the sandbox and will ask you to do it yourself. This avoids leaving you with a repository your own git will not open.\n\n- Area: Windows\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}