[BUG] Claude Code stream dies after first chunk — constant silent stalls, extensive diagnostics attached

Resolved 💬 6 comments Opened Apr 11, 2026 by titanmind Closed Jul 2, 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?

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

Environment

  • Platform: Anthropic API (native installer)
  • Claude CLI version: 2.1.101
  • OS: Windows 11 Pro 25H2 (Build 26200.8037)
  • Shell: PowerShell / Git Bash
  • Hardware: Ryzen 9 9950X3D, RTX 5090, Realtek PCIe 5GbE
  • ISP: Google Fiber 5Gbps
  • Plan: Max 20x
  • Node.js: v24.11.1

What's Wrong?

Claude Code silently stalls during model responses. Every session, multiple times per session, for months. Recently became significantly worse — stalls that used to resolve in 20-40 minutes now never resolve.

Symptom pattern:

  • Timer keeps ticking, spinner keeps spinning, UI is responsive (not frozen)
  • Token counter jumps to ~193-264 tokens then freezes permanently
  • Interrupting and retrying the same prompt stalls again immediately
  • Not tied to specific prompts — happens on both trivial and complex tasks
  • Happens roughly 1 in 3 queries across all established projects
  • Brand new empty projects work fine; projects with existing large source files trigger it
  • /learn skill (reads docs, lists files) works fine; follow-up tasks that read and analyze large code files stall

Debug log evidence:

Running with --debug shows the stream receives its first chunk, then goes silent with exponentially growing gaps:

47:44.486Z  Stream started - received first chunk
47:44.488Z  Fast mode unavailable...
48:10.466Z  Fast mode unavailable...   <- 26 second gap
48:44.518Z  Fast mode unavailable...   <- 30 second gap
49:14.499Z  Fast mode unavailable...   <- 30 second gap
50:14.516Z  Fast mode unavailable...   <- 60 second gap

Key finding — curl proves network is fine:

curl -s -o NUL -w "%{time_total}" https://api.anthropic.com/v1/messages -X POST \
  -H "content-type: application/json" -H "x-api-key: test" \
  -d "{\"model\":\"claude-sonnet-4-20250514\",\"max_tokens\":1,\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}"
0.104056

The API responds in 0.1 seconds from this machine. The problem is inside Claude Code's HTTP client/stream handling, not the network.

Exhaustive elimination list:

NETWORK:

  • curl to the API returns in 0.1 seconds
  • Stalls on ethernet (Google Fiber 5Gbps) AND phone hotspot (completely different network path, different ISP, different adapter)
  • IPv6 disabled on adapter — still stalls
  • TCP global parameters all normal (Auto-Tuning normal, ECN disabled, standard RTO)
  • No third-party network filter drivers installed on adapter
  • DNS resolves correctly for both A and AAAA records

ACCOUNT:

  • Same account (same org, same Max 20x plan) works fine on a friend's machine in the same city
  • Not rate limited — 30% weekly usage, 28% of 5hr usage at time of testing

CLAUDE CODE BINARY:

  • Native installer binary — stalls
  • npx @anthropic-ai/claude-code@latest (runs through system Node, not bundled runtime) — stalls
  • Node.js v22 — stalls
  • Node.js v24 — stalls

WINDOWS ENVIRONMENT:

  • Windows Defender real-time protection fully disabled — still stalls
  • Mullvad VPN fully uninstalled, no leftover WinTUN adapters — still stalls
  • Clean CC install (deleted entire ~/.claude, reinstalled) — still stalls
  • No hooks configured — still stalls
  • No MCP servers — still stalls
  • No plugins with hooks — still stalls
  • NODE_OPTIONS="--dns-result-order=ipv4first" — still stalls (also confirmed connections were still IPv6; env var may not affect native binary)
  • WSL2 Ubuntu — still stalls (expected since WSL2 NATs through Windows network stack)
  • Copied project to new folder without .claude/ directory — still stalls
  • CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING removed — still stalls
  • Effort level low — still stalls
  • Different models (Opus 4.6, Sonnet) — both stall

What works:

  • Brand new projects with no existing source files (CC generating code from scratch works fine)
  • Trivial prompts ("write a haiku about cats") work fine
  • /learn skill that reads documentation and lists files works fine
  • The exact same account on a different Windows machine works fine

Hypothesis:

Something in Claude Code's HTTP/2 streaming client breaks specifically when processing large-context requests (e.g. 64KB+ source files with extended thinking). The stream receives an initial burst of tokens (~200), then goes dead. The connection stays alive but no data arrives. The issue is machine-specific but not network-specific, not account-specific, and not tied to the native binary vs npm runtime.

Related: #26224 — same symptom pattern but this case is far more severe (constant, not intermittent) and includes extensive diagnostic elimination.

What Should Happen?

Tokens should stream continuously without multi-minute stalls. The stream should not die after the first chunk.

Error Messages/Logs

Steps to Reproduce

  1. Launch Claude Code on a project with existing source files (e.g. a 64KB Python file)
  2. Run /learn or similar documentation-reading skill (works fine)
  3. Send a follow-up prompt that requires reading and analyzing the large source file
  4. Token counter reaches ~200 tokens then freezes permanently
  5. UI remains responsive (timer ticking, spinner spinning, can type)
  6. Stream never resumes (previously would resume after 20-40 minutes, now never resumes)

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.101

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗