Follow Discord
Sweep 23 Oct 2026 · 21:48Z Build v2.1.310 529 read Stable v2.1.308 Latest v2.1.310 Next v2.1.310 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.310 ·

Worktree guard catches more ways git commands could reach the shared repository

The guard keeping git commands inside a worktree now catches risky git init options, find -exec with git, and bare git variable assignments

You'll notice Improvements
JSON All of v2.1.310
You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
GitArea: what it touches
ImprovementsKind: in v2.1.310,
ImprovementsSection of the release

Unclear Whether the new checks are switched on depends on two server switches whose defaults are not known.

What

A worktree is a separate working copy of a git repository that shares that repository's history. Claude Code has a guard that keeps git commands inside the worktree. It used to refuse only a command whose words up to git's subcommand were filled in when the command ran. It now also catches:

  • git init with words filled in when the command runs.
  • git init with --template, --separate-git-dir or --shared, options that act on the shared repository rather than the worktree.
  • {} in the words after git when it runs under find -exec, which fills in file names.
  • A variable that changes which repository git uses, set on a line by itself, which now gets a hint to set it on the command or with export.

These new checks sit behind two switches controlled from the server.

Why

They close gaps that could let a command, including one run by Claude, escape the worktree and change the shared repository.

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 the new checks are switched on depends on two server switches whose defaults are not known.

See this entry in the whole of v2.1.310 →

Feedback