When you use --cloud, directory sync keeps your local folder and the cloud session's copy in step. The cloud side is called the worker, and your machine is called the laptop.
There is a new way to send changes. The laptop can offer a word, appliesLinks, in the note it sends to the worker. When the worker sees it, and the laptop accepts held parents, the worker does three new things:
- sends each turn's changes as a chain of linked bundles instead of the usual outbound path
- records those links in its saved state, so it can restore an earlier environment after it is recreated and log "claude --cloud directory sync: earlier environment restored"
- reports new telemetry (usage data) fields
links_on_record,links_inheritedandearlier_life
The laptop only offers appliesLinks when the environment variable CLAUDE_CODE_DIR_SYNC_CHAIN is set. An environment variable is a named setting passed to a program when it starts. Without it, the worker behaves as before and logs nothing new.
By default nothing changes. With CLAUDE_CODE_DIR_SYNC_CHAIN set on your machine, a cloud session can carry its synced history across being recreated.