You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
SandboxArea: what it touches
ImprovementsKind: in v2.1.304,
ImprovementsSection of the release
What
The sandbox is a restricted space where Claude Code runs commands with limited access to your files. It already stopped commands from changing a .git folder, including its hooks and config.
In a git worktree, which is an extra checkout of the same repository in another folder, .git is a small file that points back to the main repository instead of a folder. Claude Code now checks whether .git is a file or a folder, and protects a .git file too.
Why
Before, a command running in the sandbox could rewrite the .git pointer file in a worktree. That gap is now closed.