What
- A new
holdsEvalSettles()check was added to the drain/session-loop wait condition, as part of a rewrite that collapsed several separate booleans into one inline check. - In headless/print mode, the background-task dispatch loop now accepts a
holdsEvalSettlescallback; when it returns true, task dispatch (takeHead()) is held rather than proceeding. - A new
bgWaitCeilingExceededfield records whether theCLAUDE_CODE_PRINT_BG_WAIT_CEILING_MSwait ceiling was reached.
Why
This gives headless/print-mode runs finer control over when background task dispatch should pause to let evaluation settle, and visibility into whether the configured wait ceiling was hit.
Names in the bundleCLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS
Documented inclaude-code/headless
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS, on Run Claude Code programmatically.
Unless a background command that the main conversation started is still running, Claude Code stops whatever is still running after 10 minutes of continuous idle waiting by default and drops its partial result. To change the 10-minute cap, …headless see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS, on Run Claude Code programmatically.