{"version":"2.1.182","anchor":"claude-code-connect-timeout-ms-streaming-time-to-first-byte-","canonical_anchor":"claude-code-connect-timeout-ms-streaming-time-to-first-byte-","heading":"CLAUDE_CODE_CONNECT_TIMEOUT_MS \u2014 Streaming time-to-first-byte timeout","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.182\/e\/claude-code-connect-timeout-ms-streaming-time-to-first-byte-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.182","markdown":"### `CLAUDE_CODE_CONNECT_TIMEOUT_MS` \u2014 Streaming time-to-first-byte timeout\n\n**What**\n\nA 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.\n\n**Usage**\n\n`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 \u2014 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 \u2014 search for `\"CLAUDE_CODE_CONNECT_TIMEOUT_MS\"` and `\"[TTFB] no response headers after\"`"}