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

Cloud directory sync gains git and tar-archive engines beside the per-file lane

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

Cloud file sync gains git-bundle and tar-archive modes, but you still sync file by file.

Two faster sync engines are wired on the client side while the cloud-side workers stay off, leaving per-file sync as the only live path.

CLAUDE_CODE_DIR_SYNC_ENGINECLAUDE_CODE_DIR_SYNC_FFWD
What

Syncing your working directory to a cloud session can now run through two new engines instead of shipping file rows one at a time. In a git checkout, each turn packs a snapshot commit into a bundle and exchanges it with the session; in a plain folder with no git root, an archive engine packs the tree into a gzipped tar. The per-file lane remains the fallback and the only always-on path, and the client-side selector is wired up while the cloud-side workers stay off unless separately enabled, so a plain claude in this build still syncs file by file.

Details
  • CLAUDE_CODE_DIR_SYNC_ENGINE takes a comma-separated list and is also readable from settings; unset keeps the defaults, in which the git engine is allowed.
  • Accepted words are git, archive and always-git to select engines, files or rows to force the older per-file sync, and none, off, 0, false or no to run no new engine. always-git additionally overrides the per-project memory that pins a directory to per-file sync.
  • An unrecognised word produces a single warning listing the vocabulary: "known: git, archive, always-git (defaults), files/rows (per-file sync), none/off/0/false/no (no new engine)".
  • The variable is in the allowlist of environment variables forwarded to child processes, alongside CLAUDE_CODE_DIR_SYNC_FFWD; the older CLAUDE_CODE_DIR_SYNC_OVERLAY name has been dropped from that allowlist.
  • On the cloud side the git worker is constructed only when CLAUDE_CODE_DIR_SYNC_GIT is set and an async enabled check passes, and the archive worker only when CLAUDE_CODE_DIR_SYNC_ARCHIVE is set. With neither set nothing beyond the row lane runs, whatever CLAUDE_CODE_DIR_SYNC_ENGINE says.
  • Arming the git engine reads the repo layout, pins HEAD, and uses git reflog to spot a commit landing while the session was being created. Each failure falls back to per-file sync with its own message and reason: arm timeout, head moved, head unreadable, layout unsupported, arm failed.
  • A directory that fell back is remembered as a dirSyncEngine entry in ~/.claude.json, and the message tells you to remove that entry to retry. Repeatedly unacknowledged uploads stop the session and pin the directory to "files", preceded by a softer one-off warning.
  • The archive engine ships its own tar writer and reader: pax headers for paths over 100 bytes, refusals for bad checksum, bad magic, unsafe path and unsupported entry, a gzip framing check, staged unpack directories, per-session state in archive-sync.json, a trash directory for peer deletes, and a 100 MiB archive cap.
  • New telemetry includes tengu_dir_sync_folder_session, tengu_dir_sync_git_worker_armed, per-turn git worker start and end events, and dir_sync_origin and dir_sync_engine properties.
Evidence

archive-sync.json, tengu_dir_sync_folder_session, A commit was made here while the session was being created; this session syncs file by file instead of through git, known: git, archive, always-git (defaults), files/rows (per-file sync), none/off/0/false/no (no new engine), tengu_dir_sync_git_worker_armed, claude: fast-forward to the cloud session, remove this directory's dirSyncEngine entry from ~/.claude.json, dir_sync_worker_archive_switch_on, ; known: git, archive, always-git (defaults), files/rows (per-file sync), none/off/0/false/no (no new engine)

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

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.242 →