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.
What's wrong with this entry?
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.
CLAUDE_CODE_DIR_SYNC_ENGINEtakes 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,archiveandalways-gitto select engines,filesorrowsto force the older per-file sync, andnone,off,0,falseornoto run no new engine.always-gitadditionally 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 olderCLAUDE_CODE_DIR_SYNC_OVERLAYname has been dropped from that allowlist. - On the cloud side the git worker is constructed only when
CLAUDE_CODE_DIR_SYNC_GITis set and an async enabled check passes, and the archive worker only whenCLAUDE_CODE_DIR_SYNC_ARCHIVEis set. With neither set nothing beyond the row lane runs, whateverCLAUDE_CODE_DIR_SYNC_ENGINEsays. - Arming the git engine reads the repo layout, pins HEAD, and uses
git reflogto 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
dirSyncEngineentry 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, anddir_sync_originanddir_sync_engineproperties.
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.
-
v2.1.246
Cloud directory sync is now git-only, plus a new mode for plain folders
Both mention engine