{"version":"2.1.282","anchor":"cloud-worker-detached-journal-state-is-decoded-only-when-p","canonical_anchor":"cloud-worker-detached-journal-state-is-decoded-only-when-p","heading":"Directory sync: journal keeps more state and can report a 'detached' stop","tier":"soon","area":"File Sync","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282\/e\/cloud-worker-detached-journal-state-is-decoded-only-when-p","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282","markdown":"### Directory sync: journal keeps more state and can report a 'detached' stop\n\nThe directory-sync journal now keeps links-stopped and basis-branch state, and sync can end with a 'detached' reason when peerKeepsFiles is set\n\n**Unclear.** It is not clear when the option is turned on, so it may not apply to anyone yet.\n\n**What**\n\nDirectory sync keeps a journal, a small record of its state, shared between your machine and the cloud worker that runs a cloud session. This release extends it:\n\n- The worker's journal note now carries `linksStopped` and an optional `basisBranch`. Both are restored from the note when the worker starts up again.\n\n- A new `decodeWorkerDetached` decoder reads a journal whose halted reason is \"detached\" and returns its `detachCause`.\n\n- The sync pull step uses it to end sync with a 'detached' reason, but only when the session's `peerKeepsFiles` option is true. The option defaults to false, and its one caller sets it based on another check.\n\n**Why**\n\nSync state survives a worker restart more completely. Where `peerKeepsFiles` applies, a sync the cloud side has detached from now stops with a clear reason instead of carrying on failing.\n\n- Area: File Sync\n- Tier: Nothing to try yet\n- Useful: 2\/5\n- Signal: 3\/5\n- Present in the build but not switched on"}