Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Claude Code · Certificates and network

API Error: No response from API

Claude Code’s “No response from API” means the API sent nothing back before the deadline, twice. What the waits mean and when to raise API_TIMEOUT_MS.

Message

The exact error

Claude Code
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.

Also appears as:

Amazon Bedrock (one deadline for both attempts)
API Error: No response from API (waited …). 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.
While still waiting (not an error yet)
Waiting for API response · will retry in … · check your network
Versions before v2.1.261
API Error: No response from API

Meaning

What does “No response from API” mean?

Claude Code sends each request as a stream and expects the response headers to arrive quickly. When none arrive before the first-byte deadline, it aborts that attempt rather than sitting out the full 10-minute request timeout, and sends the request once more. The retry waits just under API_TIMEOUT_MS (10 minutes by default), long enough to outlast a proxy that holds a response until it’s complete. If the retry gets no answer either, the turn ends with this message, which shows how long each attempt waited. Nothing was received, so there’s no partial answer to keep.

Causes

Why does the API not respond?

  • A network, VPN or firewall problem between you and the API
  • A corporate proxy or gateway that buffers whole responses before passing them on
  • A very large request: Claude Code adds one second of wait for every 32 KB of request body, but a slow upload can still run out the deadline
  • A slow or degraded API, for example during an incident
  • Specific features: public GitHub reports (#69238) link it to long advisor reviews on some versions

Fix

How do I fix “No response from API”?

  1. Send it again

    Your message is still in the conversation, so type try again instead of pasting a long prompt again. If it works on the second try, it was a one-off.

  2. If it repeats, treat it as a network problem

    Check that you can reach the API at all, and that any HTTPS_PROXY setting is right. The steps in Unable to connect to API cover DNS, proxies, VPNs and firewalls. Also look at status.claude.com.

    macOS / Linux
    curl -sI https://api.anthropic.com
    Windows PowerShell
    curl.exe -sI https://api.anthropic.com
  3. Behind a buffering proxy, wait longer

    If a proxy or gateway only forwards a response once it’s finished, raise API_TIMEOUT_MS so the retry waits longer. On Amazon Bedrock raise CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS as well. If the first attempt keeps timing out and the retry then succeeds, raising CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS (10 seconds to 30 minutes) lets the first attempt wait long enough.

    macOS / Linux, 20 minutes
    export API_TIMEOUT_MS=1200000
    claude
    Windows PowerShell, 20 minutes
    $env:API_TIMEOUT_MS = "1200000"
    claude
  4. Update Claude Code

    Run claude update. Recent versions changed both deadlines (v2.1.242 and v2.1.261), so an older build may wait differently from what this page describes.

Don’t do this

  • Setting API_TIMEOUT_MS to a huge number: values above 2147483647 overflow the timer and make every request fail at once. A positive value under 11 seconds turns the first-byte deadline off.

Explained

How is it different from “Request timed out”?

Request timed out means a request ran past the overall API_TIMEOUT_MS limit. “No response from API” is narrower: not even the response headers arrived, on two attempts. If the response starts and then goes quiet, you get a third kind of error instead, the stream idle timeout, and Claude Code keeps whatever arrived.

The yellow Waiting for API response · will retry in … · check your network line is not an error. Claude Code shows it after 20 seconds without data (90 seconds while the advisor is reviewing) and clears it when data resumes. Very large prompts take longer to send and process, so the token counter is a quick way to see how big a paste is before you send it.

FAQ

Questions people ask

Why does Claude Code wait 3 minutes and then 10 minutes?

The first attempt uses the streaming first-byte deadline, which defaults to the byte-level watchdog timeout, plus extra time for large requests. The retry waits one second less than API_TIMEOUT_MS, 10 minutes by default, so it can outlast a proxy that holds the response until it’s complete. The exact durations depend on your provider and settings.

Does “No response from API” use up my usage limit?

Anthropic’s documentation doesn’t give a figure for failed requests. No response arrived, so there is no answer to keep, and resending repeats the full request. If it keeps happening, fix the network or proxy first rather than retrying many times in a row, especially with a long conversation.

How do I make Claude Code keep retrying in CI?

Set CLAUDE_CODE_RETRY_WATCHDOG=1. With it, the one-retry cap on unanswered requests no longer applies and Claude Code keeps retrying under its retry budget, which suits unattended jobs. In an interactive session you usually want the error instead, so you can check the network.

Is “No response from API” caused by Anthropic or by me?

It can be either. If status.claude.com shows an incident, wait. If the status page is clear and the error repeats, the usual cause is on your side: a VPN, firewall or proxy holding or dropping the response. Testing from another network quickly tells you which.

Related

Search all Claude Code errors

Keep exploring