ECONNRESET reliably triggered by image upload (even <1MB, single/first images)
Description
Repeated Unable to connect to API (ECONNRESET) errors, reproducibly triggered by sending images, even when the images are small (233KB–587KB PNGs) and even in a fresh session with no prior history.
Environment
- Claude Code version: 2.1.220 (macOS, darwin 25.5.0)
- Node: v22.20.0
- No proxy, no VPN active, no MDM/security software intercepting traffic
- ISP path includes a CGNAT hop (100.64.0.0/10 range) before reaching the public internet
Reproduction
- Start a Claude Code session (fresh, no
-c/continue). - Send a message containing 1+ images (PNG, 233KB–587KB each, well under any reasonable size limit).
- Request fails with
Unable to connect to API (ECONNRESET), retries up to 10 times, frequently exhausts all retries and fails outright.
Confirmed:
- Text-only turns in the same environment/network succeed reliably (curl to
api.anthropic.comsucceeds consistently, ping/traceroute show 0% packet loss, clean path). - Failure reproduces across multiple unrelated project directories/sessions on the same machine.
- Failure reproduces on both a resumed (12MB+ history) session and a brand-new session with empty history — so it isn't just about accumulated conversation size.
- The one consistent variable across every failure is the presence of image content in the request.
Packet capture evidence
tcpdump during one occurrence showed the client mid-upload of a large request body, then the server (160.79.104.10, Anthropic's API edge) sending a short ~474-byte response packet followed immediately by a TCP RST, with the server resetting all subsequent packets from the client. This indicates the reset originates from the server/edge side after receiving (and apparently rejecting) the request — not a client-side network drop.
Impact
This makes any image-containing request unreliable, often requiring many retries or failing completely after exhausting the retry budget, interrupting active work.
Ask
Would appreciate:
- Confirmation of whether there's a request size/format constraint on image uploads that's being hit here (1.3MB total across 4 images seems far too small to be hitting a legitimate limit).
- Any server-side logs/insight into why the edge is resetting these specific requests.