[BUG]: Persistent intermittent ECONNRESET immediately after first streamed chunk, Windows, multiple CLI versions and networks.

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 1 comment · opened Aug 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Streaming responses from the API are interrupted by a connection reset almost immediately after the first chunk of data arrives. This happens on nearly every single message, including the simplest possible request, such as typing just hi. The CLI automatically retries and usually succeeds after a few attempts, so it is not a hard failure, but it happens consistently enough to disrupt normal use.

What Should Happen?

The streaming response should complete normally without the connection resetting shortly after the first chunk is received.

Error Messages/Logs

Paste this in exactly as shown.

[DEBUG] Stream started - received first chunk
[DEBUG] [API:timing] first byte after 1079ms
[WARN] Stream connection error (ECONNRESET) — retrying streaming (1/300)
[DEBUG] Stream started - received first chunk
[DEBUG] [API:timing] first byte after 981ms
[WARN] Stream connection closed (ECONNRESET) after 1 block(s) yielded — finalizing partial response
[ERROR] [engine] turn ended in error: API Error: Connection lost mid-response. The response above may be incomplete.

Steps to Reproduce

Open Claude Code CLI on Windows using the claude command.
Start a new session in any project folder.
Type a simple message such as hi and press enter.
Observe the response begin streaming, then reset within milliseconds of the first chunk arriving.
Note that this happens on most messages, with frequency varying depending on network path. It occurs on a home internet connection, on a mobile hotspot, and is only partially reduced when routing through Cloudflare WARP.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.233 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Already ruled out through testing. Windows Defender Firewall on and off, no third party antivirus present, no VPN or proxy environment variables set, Node upgraded from v20.15.1 to v22.23.2, full clean reinstall of Claude Code CLI, and downgrading Claude Code CLI to version 2.1.150. The issue persists across all of these, which points toward an intermittent edge level connection issue rather than something local to this machine.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗