Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.104 Home All releases olderv2.1.101 v2.1.105newer
Claude Code v2.1.104

Byte-level stream idle timeout detection

What

API streaming responses are now monitored at the byte level for idle connections, catching stalled streams that the existing chunk-level timeout might miss.

Details
  • 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.
  • The timeout is controlled by the existing CLAUDE_STREAM_IDLE_TIMEOUT_MS environment variable (default: 90 seconds, minimum: 15 seconds).
  • 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.
  • Error reporting is now more granular — 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.
  • Only applies to first-party and Anthropic AWS streaming connections (SSE text/event-stream responses).
Usage
# 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)")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.104 →