[BUG]
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 stalls — 3 occurrences in ~7 minutes of active conversation.
Claude Code version: 2.1.126
Model: claude-sonnet-4-6 (Sonnet 4.6)
Platform: Linux (Fedora 43, kernel 6.19.13-200.fc43.x86_64)
Shell: zsh
Symptom
During an active editing session, response streams hang mid-flight for ~15s–60s before resuming. Killing the request with Ctrl-C and resending "continue" recovers fast (~3s TTFB), suggesting the stall is on the streaming side, not the prompt-encoding side. The pattern matches lastChunkAgeMs ≥ 15000 debug warnings.
Reproducibility: Intermittent. ~3 stalls per 7 minutes of active editing in this session. Cannot reproduce on demand.
Debug log evidence (3 stalls captured in ~/.claude/debug/<session>.txt):
2026-05-02T18:18:28.508Z [WARN] Streaming stall detected: 54.4s gap between events (stall #1)
2026-05-02T18:18:28.518Z [WARN] Streaming completed with 1 stall(s), total stall time: 54.4s
2026-05-02T18:21:05.742Z [WARN] Streaming stall detected: 56.9s gap between events (stall #1)
2026-05-02T18:21:05.750Z [WARN] Streaming completed with 1 stall(s), total stall time: 56.9s
2026-05-02T18:25:28.695Z [WARN] [Stall] stream_idle_partial lastChunkAgeMs=14999 bytesTotal=666 idleDeadlineMs=300000
Notable details:
- Stall #3 fired after only 666 bytes had streamed → response size is not a predictor.
- Time-to-first-chunk on every API call was normal (~3s, including the calls that later stalled), so this is not a cold-cache or connection-establishment issue.
- No [ERROR] lines in the debug log; tool dispatches all complete in <50ms.
Affected request IDs (for correlation):
- b1423c34-1ebd-4a54-ba29-188e70dac76b (stall #1 stream)
- fc357338-baec-4137-b639-19466993e32d (stall #2 stream)
- 9070c805-c488-4310-b759-8fd874a76903 (stall #3 — caught live as stream_idle_partial)
What I see in the log that does NOT cause it:
- effortLevel: medium, autoDreamEnabled: true, agentPushNotifEnabled: true — none correlate with the stall lines.
- The 297 "Fast mode unavailable" debug-level lines are unrelated chatter (Fast mode requires /extra-usage, which I haven't enabled).
- Tool dispatch traces ([Stall] tool_dispatch_*) all finish in <50ms — those [Stall] lines are normal telemetry, not actual stalls. The real signal is "Streaming stall detected" / "stream_idle_partial".
Workaround:
Ctrl-C + retype "continue" recovers because the prompt cache stays warm. Lossy though — partial output is dropped.
What Should Happen?
Claude should answer without mid-stream stalls.
Error Messages/Logs
Steps to Reproduce
Cannot deterministically reproduce — appears intermittent on the streaming side. Frequency in this session: 3 stalls in roughly 7 minutes of active back-and-forth (after /debug was enabled; many earlier stalls in the same session predate logging).
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.126
Platform
Other
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗