claude-code - 💡(How to fix) Fix [BUG] Claude Stalling all the time [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55647Fetched 2026-05-03 04:48:01
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

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

  • No [ERROR] lines in the debug log; tool dispatches all complete in <50ms.

Error Messages/Logs

Root Cause

Ctrl-C + retype "continue" recovers because the prompt cache stays warm. Lossy though — partial output is dropped.

Fix Action

Fix / Workaround

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.

  • effortLevel: medium, autoDreamEnabled: true, agentPushNotifEnabled: true — none of these 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

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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.

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 of these 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.

Error Messages/Logs

Steps to Reproduce

Cannot deterministically reproduce — appears intermittent on Anthropic streaming infrastructure. 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

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.126

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Xterm

Additional Information

No response

extent analysis

TL;DR

The most likely fix or workaround for the streaming stalls in Claude Code is to investigate and address the root cause of the stream_idle_partial warnings, potentially related to the Anthropic streaming infrastructure.

Guidance

  • Investigate the stream_idle_partial warnings and their relation to the lastChunkAgeMs values, as these seem to be indicators of the stalls.
  • Analyze the debug logs to identify any patterns or correlations between the stalls and other events, such as tool dispatches or prompt cache activity.
  • Consider testing with different models or platforms to determine if the issue is specific to the claude-sonnet-4-6 model or Linux platform.
  • As a temporary workaround, using Ctrl-C and retyping "continue" can recover from stalls, but this may result in loss of partial output.

Example

No specific code snippet is provided, as the issue appears to be related to the Anthropic streaming infrastructure and Claude Code's interaction with it.

Notes

The issue seems to be intermittent and difficult to reproduce, which may make it challenging to identify the root cause. The fact that it worked in a previous version suggests a potential regression, but without more information on the last working version, it's hard to pinpoint the exact cause.

Recommendation

Apply the workaround of using Ctrl-C and retyping "continue" to recover from stalls, while continuing to investigate the root cause of the stream_idle_partial warnings and lastChunkAgeMs values. This workaround allows for continued use of the system, albeit with potential loss of partial output, while a more permanent fix is sought.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Claude Stalling all the time [1 comments, 2 participants]