What
When a cloud session's commits sit directly on top of your checkout's current HEAD and your working tree is clean, Claude Code now advances your local branch onto them and tells you your branch has Claude's commits. It waits instead when you have staged changes, an operation in progress, differing files or protected paths, each with a plain explanation. Set CLAUDE_CODE_DIR_SYNC_FFWD to switch this off; it is on otherwise.
Details
- The move takes the git index lock, merges the index, and updates the branch reference without following symbolic refs. If the index cannot be brought along, the whole move is undone.
- Named waiting reasons include staged_changes, operation_in_progress, files_differ, not_yet_sent, untracked_dependency_path and protected_path.
- Files whose names look like credentials, files that are git-ignored, files withheld from sync, and dot-led paths are never taken from the cloud.
- Reported in telemetry as
branch_ruleon the git sync open event.
Evidence
claude: undo the fast-forward (the index could not follow)
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundleCLAUDE_CODE_DIR_SYNC_FFWD
One source agreesOne thing we can check says the same as this entry.
The name it cites is new in this build
New in this build: CLAUDE_CODE_DIR_SYNC_FFWD