Back to guides
Troubleshooting·September 30, 2026·Updated October 22, 2026·6 min read

Claude Code “Response stalled mid-stream” and “Streaming response ended before any complete data was received” — what stops the stream

Both messages mean the streamed answer from the model stopped before it was complete. “The response above may be incomplete” is printed when some of the answer arrived and then the stream stalled, dropped or broke; Claude Code keeps what arrived, and replying continue picks the turn back up. “Streaming response ended before any complete data was received” means nothing usable arrived at all, so Claude Code retries the same request without streaming — and when that keeps happening, the cause is usually a proxy or gateway between Claude Code and the model provider, as the message itself says.

Last reviewed on .

Both messages mean the streamed answer from the model stopped before it was complete. “The response above may be incomplete” is printed when some of the answer arrived and then the stream stalled, dropped or broke; Claude Code keeps what arrived, and replying continue picks the turn back up. “Streaming response ended before any complete data was received” means nothing usable arrived at all, so Claude Code retries the same request without streaming — and when that keeps happening, the cause is usually a proxy or gateway between Claude Code and the model provider, as the message itself says.

The error

printed by Claude Code
API Error: Connection lost mid-response. The response above may be incomplete.

# the same notice for the other causes (Claude Code's error reference):
API Error: Server error mid-response. The response above may be incomplete.
API Error: Your computer went to sleep mid-response. The response above may be incomplete.
API Error: The response stopped arriving. The response above may be incomplete.
API Error: Part of the response never arrived. The response above may be incomplete.
API Error: The response stream was malformed. The response above may be incomplete.

# the older wording of the stall, quoted in reports from July 2026:
API Error: Response stalled mid-stream. The response above may be incomplete.

# when nothing complete arrived at all:
Streaming response ended before any complete data was received. Retrying without
streaming. If this keeps happening, check any proxy or gateway between Claude Code
and your model provider.

# no response headers before the first-byte deadline, which does not run when
# ANTHROPIC_BASE_URL points at a gateway:
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 status line while that retry is still running:
No response from the API after 3m · retrying once, waiting up to 10m
A proxy or gateway that buffers streaming responses can cause this · set CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS to change the first wait

Causes and fixes at a glance

CauseFix
The connection stayed open but stopped delivering data, and Claude Code's streaming idle watchdog aborted itReply continue. If long pauses are legitimate on your connection, raise CLAUDE_STREAM_IDLE_TIMEOUT_MS rather than turning the watchdog off.
The connection dropped, the computer went to sleep, or the server returned an error mid-responseReply continue; the completed part of the answer is kept. Check VPN, Wi-Fi handovers and sleep settings if it repeats.
A proxy or gateway in between buffered, truncated or rejected the stream — for example a request body over its size limitTest once without it. Raise the proxy's body-size limit and read timeout, and turn response buffering off for the API route.
It started right after a Claude Code upgradeNote the version in /status. A July 2026 report measured the stalled message at 0% on 2.1.210 and 3.0–4.4% on 2.1.217–2.1.218 on the same machine.

Reply continue first

Claude Code keeps the text and tool calls that completed before the failure and appends the notice. In an interactive session, read what arrived and reply continue: the turn resumes from there. In a non-interactive run (claude -p) Claude Code prints the last completed text block followed by the notice; resume that session and send continue. Nothing else needs to change if it happens once.

Tell the messages apart

Claude Code's error reference lists the incomplete-response wordings by cause: server error mid-response, connection lost mid-response, your computer went to sleep mid-response, the response stopped arriving (the stall), part of the response never arrived, and the response stream was malformed. Reports from July 2026 quote an older wording for the stall, “Response stalled mid-stream”. The separate message “Streaming response ended before any complete data was received” is the case where no complete data arrived, which is why Claude Code retries without streaming instead of keeping a partial answer.

Tune the watchdog, don't disable it

Claude Code runs four timers that abort a stream when it goes quiet, so a dead connection fails and retries instead of hanging: a first-byte deadline, an event-level watchdog (300 seconds), a byte-level watchdog (180 seconds on the direct Anthropic API, 300 seconds elsewhere, including a custom ANTHROPIC_BASE_URL) and, on some providers, a five-minute body idle timeout. CLAUDE_STREAM_IDLE_TIMEOUT_MS sets both watchdogs; values under five minutes are raised to five minutes and the byte-level watchdog is capped at 30 minutes. Put it in the env block of settings.json so background agents get it too:

~/.claude/settings.json
{
  "env": {
    "CLAUDE_STREAM_IDLE_TIMEOUT_MS": "600000"
  }
}

“No response from the API after 3m · retrying once” is the retry in progress

Claude Code shows this status line while it sends a streaming request a second time because the first attempt got no response headers before its first-byte deadline: 3m is how long the first attempt waited, and 10m is how long the retry will wait. If the retry goes unanswered too, the turn ends with API Error: No response from API (waited 3m, then 10m on the retry). Claude Code's error reference sets the first wait from CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS, or from the byte-level watchdog's timeout when that is unset, and the retry's wait from API_TIMEOUT_MS, ten minutes by default (https://code.claude.com/docs/en/errors, read October 22, 2026). Its advice is to send the message again; behind a proxy or gateway that holds responses until they complete, raise API_TIMEOUT_MS; and if the first attempt keeps timing out while the retry succeeds, raise CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS.

Behind a proxy or gateway, test without it

When the retry-without-streaming message repeats, take the hop out once: unset HTTPS_PROXY for a single session, or set NO_PROXY="*", and run the same task. If it stops, the hop is the cause. The usual culprits are a request-body size limit that long sessions outgrow, response buffering that turns a live stream into a long silence, and a read timeout shorter than the model's thinking pauses. Note that the first-byte deadline does not run when ANTHROPIC_BASE_URL points at a gateway, but the byte-level watchdog does.

Claude Code versions that changed this behind a gateway (October 2026)

Three releases changed sessions behind a custom ANTHROPIC_BASE_URL; their changelog entries are quoted below with the dates the versions were published on npm. 2.1.299, published on October 14, 2026, stopped aborting such streams after 180 seconds without data: they now wait 300 seconds. 2.1.304, published on October 19, turned tool search on by default behind a custom base URL and retries without it when the gateway answers 400 or 422. 2.1.305, published on October 20, fixed a regression of 2.1.304 in which every request failed when a gateway rejected tool search. If requests through a gateway started failing on 2.1.304, update Claude Code.

Claude Code CHANGELOG (npm publication dates, UTC)
2.1.299   2026-10-14
- Fixed streams through a custom `ANTHROPIC_BASE_URL` being aborted after 180 seconds with no data arriving; they now wait 300 seconds, whether or not feature flags are loaded

2.1.304   2026-10-19
- Changed tool search to be on by default behind a custom `ANTHROPIC_BASE_URL`; a 400 or 422 from the gateway is retried without it

2.1.305   2026-10-20
- Fixed every request failing on Vertex, Bedrock and other providers when the endpoint or a gateway rejects tool search, and behind gateways with ToolSearch disallowed or left out of `--tools` (a 2.1.304 regression): Claude Code now retries without it

If you’re calling through Kunavo

Kunavo is one of the gateways that message is about, so this is what it does on /v1/messages, the endpoint Claude Code calls. The upstream stream is held back until it produces its first content event; an upstream error or an empty stream before that point fails the attempt, which is retried on another channel where the model has one, or returned as an HTTP error — never as a 200 stream that ends with nothing in it. A stall after content has started is not something a gateway can retry, and Claude Code's watchdog and continue are the right tools for it. How streams end on the OpenAI-compatible side, and how to tell a whole answer from a cut one, is in LLM API streaming errors.

Frequently asked questions

What does “The response above may be incomplete” mean in Claude Code?

The streamed answer stopped after part of it had arrived — a stall, a dropped connection, a server error or the computer sleeping. Claude Code keeps the completed text and tool calls and appends the notice. Reply continue and the turn resumes from what arrived.

Is “Response stalled mid-stream” the same as “The response stopped arriving”?

They describe the same case: the connection stayed open but stopped delivering data until a streaming watchdog aborted it. Claude Code's current error reference uses “The response stopped arriving”; reports filed in July 2026 quote “Response stalled mid-stream”.

Why does Claude Code say “Retrying without streaming”?

Because the stream ended before any complete data was received, so there was nothing to keep. Claude Code sends the same request again without streaming. If the message keeps appearing, check the proxy or gateway between Claude Code and the provider — body-size limits, buffering and read timeouts are the usual causes.

Should I turn the streaming watchdog off?

No. The watchdogs exist so that a dead connection fails and retries instead of hanging the session indefinitely. If your connection legitimately goes quiet for long stretches, raise CLAUDE_STREAM_IDLE_TIMEOUT_MS (values under five minutes are raised to five minutes) instead of setting CLAUDE_ENABLE_STREAM_WATCHDOG or CLAUDE_ENABLE_BYTE_WATCHDOG to 0.

Is “The model response paused unexpectedly. Waiting for it to resume…” a Claude Code error?

No. That wording comes from the Kiro IDE: issues on Kiro's GitHub tracker quote it from August 30, 2026 (Kiro 1.0.395) on, and it appears neither in Claude Code's error reference nor in its changelog as of October 22, 2026. The messages on this page are Claude Code's own; for that one, Kiro's issue tracker is the place to look.

Does using a gateway with ANTHROPIC_BASE_URL make this more likely?

Every hop between Claude Code and the provider is one more place a stream can be buffered, cut or timed out, so test without it when the messages repeat. The byte-level watchdog also runs on gateway connections; the first-byte deadline does not when ANTHROPIC_BASE_URL routes through a gateway.

Related guides

More error semantics live in the error reference; getting a key takes a minute via signing up and the authentication guide.