Headless turns can end while leaving per-task work running, re-checking the spend cap every tick.
What's wrong with this entry?
The 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.
- The sweep disarms itself when nothing is left running, on error, on shutdown, and when the stream closes with a permission question still parked.
- Telemetry is recorded under
per_task_stop_sparingwithsparedtrue or false, plus failure codesbudget_poll_sweep_throw,liveness_probe_throwandbridge_interrupt_sweep_throw.
[print.ts] spared-budget poll sweep failed; poll disarmed (error in error log when reporting is enabled)
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.219
Headless text output recovers the last full assistant message on an incomplete run
Both mention headless mode
-
v2.1.227
Headless mode reports fatal errors instead of dying quietly
Both mention headless mode
-
v2.1.248
Headless loop guards against missing stream event fields
Both mention headless mode