{"version":"2.1.261","anchor":"new-env-var-claude-stream-first-byte-timeout-ms","canonical_anchor":"more-detailed-stream-timeout-error-message-with-tunable-env","heading":"Improved diagnostics and tuning for stream first-byte timeouts","tier":"use","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.261\/e\/new-env-var-claude-stream-first-byte-timeout-ms","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.261","markdown":"### Improved diagnostics and tuning for stream first-byte timeouts\n\nA new env var controls how long Claude Code waits for the first byte of a streamed response.\n\nA new environment variable, `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`, controls the timeout for the first byte of a streamed API response; it is now recognized and passed through by the CLI's allowed-env-var list, and stream-start timeout logic was simplified to read it directly.\n\nThe retry-status UI in the chat now special-cases requests where the API gave no response at all, showing 'No response from the API after {duration}' with either 'retrying once, waiting up to {t}' (final attempt) or 'retrying, waiting up to {t} \u00b7 attempt X\/Y', plus a hint about buffering proxies and the `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` setting.\n\nWhen a request fails with a `StreamNoResponseError` (no first byte received in time), the error message now reports how long Claude Code waited, including whether it escalated to a retry window, and suggests raising `API_TIMEOUT_MS` or `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` if a proxy or gateway is holding responses.\n\n- Area: Internals\n- Names: `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 1\/5"}