{"version":"2.1.319","anchor":"stream-event-hold-gets-a-no-subscriber-variant-and-a-set-has","canonical_anchor":"two-new-env-knobs-for-stream-event-hold-and-resume-goodbye-s","heading":"Streaming output can be held longer when nobody is watching","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319\/e\/stream-event-hold-gets-a-no-subscriber-variant-and-a-set-has","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319","markdown":"### Streaming output can be held longer when nobody is watching\n\nNew CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS and set_has_subscribers tune stream holds; resume goodbye skipping gets an off switch\n\n**What**\n\nWhen Claude Code runs under an SDK or remote host, it sends its output as a stream of events (stream-json). An environment variable is a setting passed to a program when it starts. This release adds several:\n\n- `set_has_subscribers` is a new control request a host can send to say whether anyone is watching the stream-json output.\n\n- `CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS` is passed as `noSubscriberHoldMs` next to the existing `CLAUDE_CODE_STREAM_EVENT_HOLD_MS`. With the hold variable set and no subscribers, each hold lasts the no-subscriber time if that is longer.\n\n- `CLAUDE_CODE_DISABLE_RESUME_LOAD_GOODBYE_SKIP` narrows a resume behaviour. The worker's goodbye is now skipped during resume load only when this variable is unset and `skipsGoodbyeDuringResumeLoad()` is true. Before, the skip depended only on the resume-load check.\n\n- `CLAUDE_CODE_TRANSCRIPT_TAIL_LOAD` and `CLAUDE_CODE_THREAD_CPU_ONE_IN` are new names in this build. Only the list entries were seen, not the code that reads them. From their names they appear to cover loading only the end of a transcript and thread CPU sampling.\n\n- `CLAUDE_CODE_DISABLE_TRANSCRIPT_READ_AHEAD` was already present and now also appears in these lists.\n\n`CLAUDE_CODE_TRANSCRIPT_TAIL_LOAD` and `CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS` sit in the environment allowlists next to `CLAUDE_CODE_TRANSCRIPT_SLIM_TOOL_RESULTS` and `CLAUDE_CODE_STREAM_EVENT_HOLD_MS`. `CLAUDE_CODE_THREAD_CPU_ONE_IN` is added to a separate check.\n\n**Why**\n\nSDK hosts can let Claude Code batch streaming output more when nobody is watching it. Remote or worker sessions that resume skip the goodbye in fewer cases, and `CLAUDE_CODE_DISABLE_RESUME_LOAD_GOODBYE_SKIP` turns that skip off.\n\n- Area: SDK\n- Names: `set_has_subscribers`, `stream-json`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}