Print mode (-p) runs Claude Code without the interactive screen, usually from a script or another program, called the host here. Before, the only thing that stopped print mode waiting on background tasks was the time limit set by CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS. Background tasks are commands or helpers that keep running while Claude works on something else.
Now print mode also stops waiting when both of these are true:
- its input has been closed
- the host that started it has gone away
It then stops the background tasks and prints this notice to the error output: "Nothing reads the output any more; stopping background tasks". Its log records "The host is gone: no longer waiting to wake the model".
This check also overrides two other things that would otherwise keep the session waiting: an armed monitor, and work queued for the main conversation.
A headless run whose reader has disappeared no longer hangs on background shells that nobody will ever see the result of.
tengu_giggly_dragonfly Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.333: on
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
tengu_print_ceiling_stop_agents Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.333: on
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.333. It isn't a statement about your account. What a flag value here can and cannot tell you
Changed SDK sessions to end background commands, monitors and wakeups once the host is gone and no subagent runs…