You send a prompt in Claude Code, the spinner runs for three minutes, and it ends with API Error: No response from API (waited 3m, then 10m on the retry). That means the API did not return even the response headers within the first-byte deadline, Claude Code aborted and retried once, and the retry also went unanswered.
This guide explains what each number in the message means, what to do in order, and which environment variables change the behavior. Everything was checked against the official Claude Code documentation on 2026-10-11.
What does "No response from API (waited 3m, then 10m on the retry)" mean?
It means Claude Code sent a streaming request and the API returned no response headers before the first-byte deadline. Instead of waiting the full 10 minutes of API_TIMEOUT_MS, Claude Code aborts and resends at most once. If the retry also goes unanswered, the turn ends with the full message:
API Error: No response from API (waited 3m, then 10m on the retry). If a proxy or gateway on your network holds responses until they complete, raise API_TIMEOUT_MS or CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS to wait longer.
The two durations are the two waits: the first attempt (3m) and the retry (10m). Before the turn ends, you may see for a few seconds the line No response from the API after 3m · retrying once, waiting up to 10m, which signals that the retry has started.
How long does Claude Code wait before aborting?
On the direct Anthropic API, 180 seconds for the first attempt, plus 1 second for every 32KB of request body. The retry waits one second less than API_TIMEOUT_MS, so almost 10 minutes by default.
| Item | Default | How to change it |
|---|---|---|
| First attempt, direct Anthropic API | 180 s + 1 s per 32KB of request | CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS (clamped between 10 s and 30 min) |
| First attempt, other providers | 300 s + 1 s per 32KB | same variable |
| Retry | API_TIMEOUT_MS minus 1 s (about 10 min) | API_TIMEOUT_MS |
Behind a gateway via ANTHROPIC_BASE_URL | the first-byte deadline does not run | not applicable |
The CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS variable requires Claude Code v2.1.242 or newer, and the message with both durations appears from v2.1.261. Before v2.1.242, Claude Code waited the full 10 minutes before failing.
What should you do when the error shows up?
Send the message again. Your original message is still in the conversation, so for a long prompt you can type try again instead of pasting everything. If the error repeats, treat it as a network or proxy problem.

- Type
try againand see whether the response arrives. - If it repeats, test the connection to the API outside Claude Code (for example,
curl -I https://api.anthropic.com) to separate a network problem from a Claude Code problem. - If there is a proxy or gateway on your network that holds the response until it completes, raise the retry wait:
export API_TIMEOUT_MS=900000 - If the first attempt always times out and the retry succeeds, tune the first-byte deadline:
export CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS=300000
In PowerShell, the syntax is $env:CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS = "300000". Set the variables before opening Claude Code.
Does the error show up after switching networks or Wi-Fi?
There is an open report in exactly that scenario. In issue #99524, opened on 2026-10-04 with Claude Code 2.1.293 on Linux, the author describes that after moving the machine to a different network, the next prompt gets no response for about 3 minutes, and the retry works within 3 seconds. A freshly started Claude Code on the same network answers right away.
The same report says that with CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS=30000, the wait drops from 180 to 30 seconds and the retry succeeds right after: the variable shortens the wait but does not avoid it. The issue is still open, and the hypothesis that the old connection hangs comes from the author, not from Anthropic.
A second user commented that they see the same symptom on a stable network, with no Wi-Fi change, VPN or proxy, on a Linux cluster node with 2.1.289, and used CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS=60000 to debug with claude --debug. So a network switch is not the only possible cause.
Should you raise or lower CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS?
It depends on what is happening, and the documentation and the user reports point in opposite directions.
| Situation | Adjustment | Source |
|---|---|---|
| The first attempt times out and the retry succeeds, with the response genuinely slow | Raise CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS | Official documentation |
| A proxy or gateway holds the response until it completes | Raise API_TIMEOUT_MS | Official documentation |
| Dead connection after switching networks | Lower the variable (e.g. 30000) to lose less time, or open a new session | Report in issue #99524, unofficial |
Mind the limit: the value is clamped between 10 seconds and 30 minutes. A value that is too low can make Claude Code abort a response that was just slow to start.
How do you see what is happening underneath?
Open Claude Code with claude --debug. The log shows when the request went out and when the first-byte deadline expired, which separates "the network is not delivering" from "the API is slow".
If what blocks your work is your plan limit and not the network, Verboo Code has unlimited tokens.



