{"version":"2.1.337","anchor":"stream-damage-check-can-be-disabled-via-env-var","canonical_anchor":"stream-damage-check-can-be-disabled-via-env-var","heading":"Damaged streamed replies now fail with an error, with an environment variable to turn the check off","tier":"notice","area":"API Streaming","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/stream-damage-check-can-be-disabled-via-env-var","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Damaged streamed replies now fail with an error, with an environment variable to turn the check off\n\nClaude Code now checks streamed replies for corruption and stops with 'Reply damaged in transit'; CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK turns the check off\n\n**What**\n\nClaude's replies arrive as a stream of small pieces called SSE frames. Claude Code now checks those frames for signs of corruption. It treats a frame as damaged when it finds:\n\n- NUL or U+FFFD characters in field names\n\n- event names wrapped in quotes\n\n- events with no name\n\n- event names one letter off from a real one\n\n- pings joined together\n\n- data whose type differs from the event it arrived under\n\nWhen this happens, Claude Code stops with the message 'Reply damaged in transit. Try again. (--debug for details)'. It also logs a warning that the stream failed as damaged.\n\nSetting the environment variable `CLAUDE_CODE_DISABLE_STREAM_DAMAGE_CHECK` to `1`, `true`, `yes` or `on` turns the check off. This variable did not exist before. The warning itself points out the risk: with the check off, a tool could run on incomplete input. Before this change, malformed frames were parsed or passed through.\n\n**Why**\n\nA reply garbled in transit now stops with a clear error instead of producing broken output, or a tool run on partial instructions. If the check gets in your way, you can turn it off, at the cost of that protection. Running with `--debug` (Claude Code's debug mode) shows more detail.\n\n- Area: API Streaming\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}