Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.324 ·

Git is refused in repositories Claude Code can't match to your project

A new check stops git when it would use a repository that isn't this project's and that you haven't trusted or added with --add-dir

Nothing to try yet In Development
JSON All of v2.1.324
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.

Read from
Names in the bundle--add-dir
Since it was published

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 since Anthropic'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 them changelog see the edit
Added since A 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… headless see 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.

See this entry in the whole of v2.1.324 →

Feedback