Back to guides
Troubleshooting·September 30, 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: Response stalled mid-stream. The response above may be incomplete.

# the wording in Claude Code's current error reference for the same stall:
API Error: The response stopped arriving. 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.

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. 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"
  }
}

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.

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.

FAQ

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.

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 sign up and the authentication docs.