Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.307 ·

New CLAUDE_CODE_DIFF_COPY_ROOT and CLAUDE_CODE_FOUND_REPOSITORY_GIT environment variables

Two new host-controlled environment variables, CLAUDE_CODE_DIFF_COPY_ROOT and CLAUDE_CODE_FOUND_REPOSITORY_GIT, are added to Claude Code's protected set

Group of 2 Under the hood Internal Changes
JSON All of v2.1.307
Under the hoodTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Self-Hosted RunnerArea: what it touches
Internal ChangesKind: in v2.1.307,
Internal ChangesSection of the release

What

An environment variable is a named value set in the environment a program starts in. Claude Code keeps a protected set of environment variable names that only the starting environment or Claude Code itself may set. That set previously held only CLAUDE_STAGE_FILE_ROOT. It now also holds two new variables:

  • CLAUDE_CODE_DIFF_COPY_ROOT names the folder for a checked copy of the repository's git settings. Claude Code reports an error if the value is not an absolute path, meaning a full path starting from the root of the file system.
  • CLAUDE_CODE_FOUND_REPOSITORY_GIT is set to "1" in the environment Claude Code uses when it runs git. That environment also sets gitStartsIn to the file system root.

The set feeds a check on environment variable names that also treats CLAUDE_CODE_REMOTE_TOOLS_FORWARD specially. A new message says a protected variable "is unchanged: only the environment Claude Code starts with, or Claude Code itself, may give it this value (host rule)".

Why

If something else tries to set one of these variables, it is left unchanged and the message above explains why. In practice these values come from whatever launches Claude Code, not from a project or its settings.

See this entry in the whole of v2.1.307 →

Feedback