[BUG] SSE stream to /v1/code/sessions/.../worker/events/stream closes immediately after connect — ECONNRESET banner, 2 machines / 2 networks

Status Open
Reported on v2.1.224
Maintainer reply None cached
Activity 0 comments · opened Aug 10, 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?

The remote-bridge SSE stream connects successfully, then is closed by the
remote end immediately, in a tight reconnect loop. This surfaces to the user
as "Unable to connect to API (ECONNRESET) · Retrying in 35s · attempt 7/10".

Regular HTTPS requests to api.anthropic.com succeed in the same session
(session archive returns 200, presence pulses work). Only the SSE stream fails.

KEY DETAIL: Reproduces on two different machines, on two different networks
with different ISPs, using the same account. Not machine-local, not
network-local. Ongoing 5 days.

The same account also fails in Claude Cowork (desktop), which errors
immediately on any command. Chat on claude.ai works normally.The remote-bridge SSE stream connects successfully, then is closed by the
remote end immediately, in a tight reconnect loop. This surfaces to the user
as "Unable to connect to API (ECONNRESET) · Retrying in 35s · attempt 7/10".

Regular HTTPS requests to api.anthropic.com succeed in the same session
(session archive returns 200, presence pulses work). Only the SSE stream fails.

KEY DETAIL: Reproduces on two different machines, on two different networks
with different ISPs, using the same account. Not machine-local, not
network-local. Ongoing 5 days.

The same account also fails in Claude Cowork (desktop), which errors
immediately on any command. Chat on claude.ai works normally.

What Should Happen?

The SSE stream to /v1/code/sessions/{id}/worker/events/stream should stay
open, and Claude Code should run normally without the ECONNRESET banner.

Error Messages/Logs

SSETransport: Opening https://api.anthropic.com/v1/code/sessions/cse_.../worker/events/stream
SSETransport: Connected
[ERROR] SSETransport: Stream read error: The socket connection was closed unexpectedly
SSETransport: Stream ended, reconnecting
SSETransport: Reconnecting in 1153ms (attempt 1, 0s elapsed)

(repeats indefinitely)

At teardown:
[ERROR] CCRClient: Epoch mismatch (409, reason=unattributed), shutting down
[WARN] CCRClient: client events failed: terminal request-path condition

Working in the same session:
[DEBUG] [code-session] Archive session_... status=200
[DEBUG] [presence] pulse -> https://api.anthropic.com/v1/code/sessions/.../client/presence

Steps to Reproduce

  1. Install Claude Code v2.1.224 via npm on Windows 10 Pro
  2. Authenticate with a Claude Pro subscription account
  3. cd into any folder
  4. Run: claude --debug
  5. SSE reconnect loop begins immediately at startup
  6. ECONNRESET banner appears; session cannot proceed

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.224 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Environment:

  • Node v24.19.0, npm 11.17.0
  • Windows 10 Pro 22H2 (build 19045) x64
  • Claude Pro plan, location Vietnam

Ruled out:

CF-RAY: a2865d8388fc2b12-HKG

  • MTU: ping -f -l 1472 -> 0% loss, 19ms RTT
  • Proxy: netsh winhttp show proxy -> direct; HTTPS_PROXY / HTTP_PROXY /

ANTHROPIC_BASE_URL all unset

  • Antivirus: Windows Defender only, no third-party TLS inspection
  • Virtualization: CoworkVMService Running, HypervisorPlatform Enabled,

WSL2 reaches internet normally

  • System files: DISM RestoreHealth OK, sfc /scannow repaired files, no change

Full --debug log attached.

View original on GitHub ↗