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.126 Home All releases olderv2.1.124 v2.1.128newer
Claude Code v2.1.126

Streaming idle-timeout calculation extracted into a helper

What

The logic that decides how long the SSE/streaming HTTP layer waits before declaring an idle stream dead has been pulled into its own function. Behavior is effectively unchanged — both before and after, the timeout is the maximum of the user's CLAUDE_STREAM_IDLE_TIMEOUT_MS env var and a 300000 ms (5 minute) floor.

Details
  • Previous inline expression: Math.max(parseInt(process.env.CLAUDE_STREAM_IDLE_TIMEOUT_MS || "", 10) || 90000, 300000).
  • New helper: Math.max(Number(process.env.CLAUDE_STREAM_IDLE_TIMEOUT_MS) || 0, 300000).
  • The 90000 fallback in the old version was always dominated by the 300000 floor, so the 5-minute minimum is preserved.
  • The env var continues to behave the same: setting CLAUDE_STREAM_IDLE_TIMEOUT_MS above 300000 raises the timeout; values at or below 300000 are clamped to the 5-minute floor.

This is mostly an internal cleanup, but documented here because CLAUDE_STREAM_IDLE_TIMEOUT_MS is a user-configurable env var — its semantics are unchanged in this release.

Evidence

New function returning the timeout (search for "CLAUDE_STREAM_IDLE_TIMEOUT_MS"); call site previously had the inline Math.max(...) expression and now invokes the helper.

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.126 →