Nothing to try yetTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Git SafetyArea: what it touches
In DevelopmentKind: in v2.1.324,
In DevelopmentSection of the release
What
Claude Code has a new check before running git. If git would use a repository that Claude Code can't match to this project or to one you trusted, the command is refused. The message tells you to trust that repository, or to name it with --add-dir. This check is controlled by a server-side setting.
Why
A repository's settings can tell git to run other programs. This check stops git from running programs set by a repository you have not trusted.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up --add-dir, on Claude Code changelog.* Changed the Bash sandbox on Linux and WSL to create some missing `--add-dir` folders before each sandboxed command, so commands that create them can fail, skip, or land inside themchangelogsee the edit
Added sinceA small documentation edit on Run Claude Code programmatically touched a line naming --add-dir after this was published.* **System reminders**: Claude receives your prompts and the tool results without the [system reminders](https://code.claude.com/docs/en/glossary.md#system-reminder) Claude Code would add alongside them. For example, Claude isn't told when…headlesssee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesA small documentation edit on Run Claude Code programmatically touched a line naming --add-dir after this was published.