{"version":"2.1.331","anchor":"stream-events-counted-and-gated-differently-in-headless-outp","canonical_anchor":"stream-events-counted-and-gated-differently-in-headless-outp","heading":"Streamed events are now counted and numbered","tier":"internal","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/stream-events-counted-and-gated-differently-in-headless-outp","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Streamed events are now counted and numbered\n\nHeadless output now counts stream events before sending them, and remote sessions mark their event stream as numbered\n\n**Unclear.** It is not clear whether programs reading streaming events now receive more, fewer or the same events.\n\n**What**\n\nWhile Claude is answering, Claude Code sends a series of small stream events. Two changes touch how they are tracked:\n\n- In headless output, used when another program reads Claude Code's output, the sender now counts each event. If its first check fails it records a skip. Otherwise it records the event and runs a second check before sending. Before, one combined check decided\n\n- The connection settings for remote sessions now set `streamEventsAreNumbered` to true and pass a `restateOpenBlock` setting through\n\n**Why**\n\nThis may change which stream events reach programs built on the SDK, and how events are put in order for remote sessions.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}