Streaming requests, and Bedrock POSTs to the invoke path, are now wrapped in a watchdog that aborts if the first response headers never arrive. The budget is computed from the request body size and API_TIMEOUT_MS, and CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS overrides it. Time the machine spent asleep is measured and reported separately, so a laptop that suspended mid-request is not mistaken for a hung server.
- Applies to armed requests only; other calls keep their existing timeout behaviour.
- Aborts are reported under the
tengu_api_no_response_timeoutevent with the sleep-adjusted duration.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
| [`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](/docs/en/env-vars) | unset | Deadline in milliseconds for the first response byte of a streaming request. Requires Claude Code v2.1.242 or later. For how Claude Code picks the deadline when this is…errors see the edit
| [`API_TIMEOUT_MS`](/docs/en/env-vars) | 600000 | Per-request timeout in milliseconds. Raise it for slow networks or proxies. It also caps how long Claude Code waits for response headers, described in [No response from API](#no-response-f…errors see the edit
Anthropic's documentation has since written up API_TIMEOUT_MS, on Error reference.
New in this build: CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS