{"version":"2.1.246","anchor":"headless-turns-can-end-without-stopping-per-task-work","canonical_anchor":"headless-turns-can-end-without-stopping-per-task-work","heading":"Headless turns can end without stopping per-task work","tier":"internal","area":"Headless Mode","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/headless-turns-can-end-without-stopping-per-task-work","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Headless turns can end without stopping per-task work\n\nHeadless turns can end while leaving per-task work running, re-checking the spend cap every tick.\n\n**What**\n\nThe print\/headless driver gained a second way to tear down a turn: instead of stopping everything, it can leave per-task work running and arm a 100ms sweep that re-checks the spend cap and the running tasks each tick. Which of the two paths is taken is decided by a boolean inside the print module with no flag or environment variable at the call site.\n\n**Details**\n\n- The sweep disarms itself when nothing is left running, on error, on shutdown, and when the stream closes with a permission question still parked.\n- Telemetry is recorded under `per_task_stop_sparing` with `spared` true or false, plus failure codes `budget_poll_sweep_throw`, `liveness_probe_throw` and `bridge_interrupt_sweep_throw`.\n\n**Evidence**\n\n`[print.ts] spared-budget poll sweep failed; poll disarmed (error in error log when reporting is enabled)`\n\n- Area: Headless Mode\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}