Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.242 Home All releases olderv2.1.241 v2.1.243newer
Claude Code v2.1.242

Git-aware directory sync for cloud sessions, off unless an env var is set

Not switched on
Useful3 Signal5
Cloud Sessions Notable not in their notes

A git sync engine keeps a cloud container's checkout in step with yours, off unless an env var is set.

Snapshotting, bundle merging and commit replay with conflict parking are all built, gated on CLAUDE_CODE_DIR_SYNC_GIT.

CLAUDE_CODE_DIR_SYNC_GIT--write-tree
What

The cloud worker gains a large git sync engine that keeps the container's checkout in step with yours: it snapshots the working tree, merges your bundle, replays the agent's unpublished commits onto your HEAD, and parks them under session refs when the replay conflicts. None of it runs unless CLAUDE_CODE_DIR_SYNC_GIT is set, and even then it checks that directory sync itself is enabled before arming.

Details
  • Merging uses git merge-tree --write-tree; staging is mirrored across as well as commits.
  • It writes long explanatory notices to the agent for branch name collisions, oversized files, nested repositories inside the checkout, and containers that were recreated from the session's starting state.
  • The factory returns null immediately when the env var is absent.
  • Scale of the change: telemetry names beginning dir_sync_git go from 1 occurrence in v2.1.241 to 79 here, roughly 4,000 lines of new code.
Evidence

Directory sync: this checkout was RECREATED from the session's starting state (the cloud container was replaced).

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.242 →