You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.324,
ImprovementsSection of the release
Unclear Whether this check runs by default depends on a remote switch whose default is not known.
What
A git worktree is a second working copy of the same repository, kept in its own folder. After Claude Code creates one with git worktree add, it now checks for an unexpected file named commondir that a command run inside the sandbox might have planted. The sandbox is the restricted environment Claude Code can run commands in.
If Claude Code finds such a file, it does one of two things:
Deletes the file and stops with an error
Tells you not to run git in that folder
The check is tied to a remote switch.
Why
This is a security hardening. A command running in the sandbox should not be able to leave behind a file that changes how git behaves in the new worktree.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether this check runs by default depends on a remote switch whose default is not known.