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.182 Home All releases olderv2.1.181 v2.1.183newer
Claude Code v2.1.182

CLAUDE_CODE_CONNECT_TIMEOUT_MS — Streaming time-to-first-byte timeout

What

A new environment variable that sets a hard timeout for receiving the first response headers on streaming API calls. When the API does not return headers within the configured time, the request is aborted with a clear error instead of hanging.

Usage
CLAUDE_CODE_CONNECT_TIMEOUT_MS=15000 claude   # abort if no headers within 15 s
Details
  • Applies only to streaming requests (event-stream, Bedrock eventstream, :streamRawPredict paths)
  • Error message: "Request timed out: no response headers after 15s (CLAUDE_CODE_CONNECT_TIMEOUT_MS)"
  • Warning logged: "[TTFB] no response headers after Nms — aborting (CLAUDE_CODE_CONNECT_TIMEOUT_MS)"
  • Previously there was no way to configure a TTFB timeout; streaming requests would wait indefinitely for the first byte before any timeout applied
Evidence

New yVu() function and timeout logic — search for "CLAUDE_CODE_CONNECT_TIMEOUT_MS" and "[TTFB] no response headers after"

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