{"version":"2.1.227","anchor":"hook-for-syncing-a-worker-directory-around-each-headless-tur","canonical_anchor":"hook-for-syncing-a-worker-directory-around-each-headless-tur","heading":"Hook for syncing a worker directory around each headless turn","tier":"soon","area":"Headless Mode","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/hook-for-syncing-a-worker-directory-around-each-headless-tur","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Hook for syncing a worker directory around each headless turn\n\nHeadless runs can sync a worker directory before and after each turn, if the host provides a callback.\n\n**What**\n\nThe headless streaming loop accepts an optional callback that runs before each turn and again after it, receiving the message IDs from that turn. It only runs when the embedding caller supplies one, and nothing in the CLI itself does.\n\n**Evidence**\n\n`workerDirSync`\n\n- Area: Headless Mode\n- Tier: Nothing to try yet\n- Useful: 1\/5\n- Signal: 3\/5\n- Present in the build but not switched on"}