{"version":"2.1.333","anchor":"headless-print-mode-stops-background-tasks-when-the-host-is","canonical_anchor":"headless-print-mode-stops-background-tasks-when-the-host-is","heading":"Print mode stops background work once nothing is reading its output","tier":"notice","area":"Headless Mode","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/headless-print-mode-stops-background-tasks-when-the-host-is","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Print mode stops background work once nothing is reading its output\n\nIn print mode, Claude Code now stops background tasks once its input is closed and the program that started it has gone away\n\n**What**\n\nPrint 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.\n\nNow print mode also stops waiting when both of these are true:\n\n- its input has been closed\n\n- the host that started it has gone away\n\nIt 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\".\n\nThis check also overrides two other things that would otherwise keep the session waiting: an armed monitor, and work queued for the main conversation.\n\n**Why**\n\nA headless run whose reader has disappeared no longer hangs on background shells that nobody will ever see the result of.\n\n- Flag `tengu_giggly_dragonfly`: Not enough to say (read for one account on one subscription tier against v2.1.333; this account: no value returned, anonymous baseline: no value returned, compiled default: 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.\n- Flag `tengu_print_ceiling_stop_agents`: Not enough to say (read for one account on one subscription tier against v2.1.333; this account: no value returned, anonymous baseline: no value returned, compiled default: 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.\n- Area: Headless Mode\n- Names: `CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}