{"version":"2.1.104","anchor":"byte-level-stream-idle-timeout-detection","canonical_anchor":"byte-level-stream-idle-timeout-detection","heading":"Byte-level stream idle timeout detection","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.104\/e\/byte-level-stream-idle-timeout-detection","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.104","markdown":"### Byte-level stream idle timeout detection\n\n**What**\n\nAPI streaming responses are now monitored at the byte level for idle connections, catching stalled streams that the existing chunk-level timeout might miss.\n\n**Details**\n\n- A new `StreamIdleTimeoutError` class and `TransformStream` wrapper monitor the raw byte stream from the API. If no bytes arrive within the timeout window, the stream is aborted and retried.\n- The timeout is controlled by the existing `CLAUDE_STREAM_IDLE_TIMEOUT_MS` environment variable (default: 90 seconds, minimum: 15 seconds).\n- This is layered on top of the pre-existing chunk-level idle timeout, providing defense-in-depth: the byte-level check catches low-level TCP stalls, while the chunk-level check handles higher-level protocol issues.\n- Error reporting is now more granular \u2014 when a stream times out after receiving partial data, the error message distinguishes \"Stream idle timeout - partial response received\" from \"Stream idle timeout - no chunks received\", which should improve diagnostics.\n- Only applies to first-party and Anthropic AWS streaming connections (SSE `text\/event-stream` responses).\n\n**Usage**\n\n`# Override the default 90s idle timeout (minimum 15s) CLAUDE_STREAM_IDLE_TIMEOUT_MS=60000 claude` **Evidence** New `StreamIdleTimeoutError` class (search for `\"stream idle: no bytes for\"`) and TransformStream wrapper in fetch middleware (search for `\"Streaming idle timeout (byte-level)\"`)"}