[Bug] Anthropic API Error: Connection closed mid-response during streaming

Status Open
Reported on v2.1.218
Maintainer reply None cached
Activity 0 comments · opened Jul 23, 2026

Bug Description
va a ingeniería y no toca facturación. Este es el otro:

Requesting credit for 7 turns terminated by server-side stream closure.

Between 00:52 and 02:13 UTC on 2026-07-23, seven Claude Code turns terminated
with "API Error: Connection closed mid-response". In each case the response was
cut mid-stream and the output was unusable — the work had to be re-run. The
consumption for those turns was still billed.

I understand tokens generated before a stream closes are normally billed, and
I'm not disputing that as a general policy. I'm asking for a credit on these
specific turns because the closures were infrastructure-side, not client-side,
and left nothing usable. One of them (req_011CdJBRhvwZAptx3eac2TFM) closed
~1.3 seconds after the response began, which is not consistent with a normal
long-generation timeout.

Request IDs:
req_011CdJ5D1qQCXnEoNVgMSskG, req_011CdJ5UP9y2BtfTjFm5ikT5,
req_011CdJ63Qfg7VNoGQrid3QSu, req_011CdJ6jTHo2mWgkCHb2wpst,
req_011CdJ79HBFWpYFKnYL1GJrR, req_011CdJ7XA9T8PYGYmaUQN8j8,
req_011CdJBRhvwZAptx3eac2TFM

Claude Code 2.1.218, macOS, model claude-opus-4-8.
A bug report with the same request IDs has been filed via /bug.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.218
  • Feedback ID: 608db395-8d1e-4059-bd9d-0a84f2c9fb19

Errors

[]

View original on GitHub ↗