claude-code - 💡(How to fix) Fix [BUG] Streaming stall: 150s gap mid-tool-call, no UI feedback during gap [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#55681Fetched 2026-05-03 04:47:13
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1cross-referenced ×1

Error Message

2026-05-02T19:53:58.158Z [WARN] Streaming stall detected: 150.0s gap between events (stall #1) 2026-05-02T19:53:58.160Z [WARN] Streaming completed with 1 stall(s), total stall time: 150.0s

Error Messages/Logs

Fix Action

Fix / Workaround

2026-05-02T19:51:24.858Z [DEBUG] [API REQUEST] /v1/messages 2026-05-02T19:51:26.570Z [DEBUG] Stream started - received first chunk 2026-05-02T19:53:58.158Z [WARN] Streaming stall detected: 150.0s gap between events (stall #1) 2026-05-02T19:53:58.160Z [WARN] Streaming completed with 1 stall(s), total stall time: 150.0s 2026-05-02T19:54:05.068Z [INFO] [Stall] tool_dispatch_start ... permissionDecisionMs=156921

2026-05-02 14:53:47.082 [info] From claude: 2026-05-02T21:53:47.082Z [INFO] [Stall] tool_dispatch_start tool=PowerShell toolUseId=toolu_01SyE41Q2YSNLrjunnXNgWv9 permissionDecisionMs=153827

Code Example

2026-05-02 14:53:44.158 [info] Received message from webview: {"type":"request","requestId":"nofyo2316dq","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":true,"hasUnseenCompletion":false}}
2026-05-02 14:53:44.160 [info] Received message from webview: {"type":"request","requestId":"cmw9r7xecbi","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"waiting_input","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:44.160 [info] Received message from webview: {"type":"request","requestId":"fkdrunf4s1n","request":{"type":"show_notification","message":"Claude is requesting permission to use PowerShell","severity":"info","buttons":["View"],"onlyIfNotVisible":true}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"o0ot9i4w6y","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"nb23r2ia7ah","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"running","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"f11pqseq0cs","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-05-02 14:53:47.066 [info] Received message from webview: {"type":"request","requestId":"1xerlzy3s1v","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"running","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:47.069 [info] Received message from webview: {"type":"response","requestId":"c5509810532d5d6d3b35e76b35a93863","response":{"type":"tool_permission_response","result":{"behavior":"allow","updatedInput":{"command":"$pkgs = @('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'); $freeze = Get-Content anaconda_pip_freeze.txt; foreach ($p in $pkgs) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if ($line) { $line } else { \"$p : NOT FOUND in pip freeze\" } }","description":"Extract versions of project's third-party packages"},"updatedPermissions":[{"type":"addRules","rules":[{"toolName":"PowerShell","ruleContent":"$pkgs = @('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'); $freeze = Get-Content anaconda_pip_freeze.txt; foreach ($p in $pkgs) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if ($line) { $line } else { \"$p : NOT FOUND in pip freeze\" } }"}],"behavior":"allow","destination":"session"}]}}}
2026-05-02 14:53:47.081 [info] From claude: 2026-05-02T21:53:47.080Z [DEBUG] Applying permission update: Adding 1 allow rule(s) to destination 'session': ["PowerShell($pkgs = @\\('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'\\); $freeze = Get-Content anaconda_pip_freeze.txt; foreach \\($p in $pkgs\\) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if \\($line\\) { $line } else { \"$p : NOT FOUND in pip freeze\" } })"]

2026-05-02 14:53:47.082 [info] From claude: 2026-05-02T21:53:47.082Z [INFO] [Stall] tool_dispatch_start tool=PowerShell toolUseId=toolu_01SyE41Q2YSNLrjunnXNgWv9 permissionDecisionMs=153827
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?

Subject: Streaming stall: 150s gap mid-tool-call, no UI feedback during gap

Environment:

Claude Code 2.1.126.d6f, claude-vscode entrypoint
VS Code native extension, Windows 11
Model: Opus 4.7

Symptom: Approval prompt for a long PowerShell tool call did not appear for ~2.5 minutes after the tool call was emitted. From the user's perspective, the UI looked frozen.

Log evidence (timestamps in UTC):

2026-05-02T19:51:24.858Z [DEBUG] [API REQUEST] /v1/messages 2026-05-02T19:51:26.570Z [DEBUG] Stream started - received first chunk 2026-05-02T19:53:58.158Z [WARN] Streaming stall detected: 150.0s gap between events (stall #1) 2026-05-02T19:53:58.160Z [WARN] Streaming completed with 1 stall(s), total stall time: 150.0s 2026-05-02T19:54:05.068Z [INFO] [Stall] tool_dispatch_start ... permissionDecisionMs=156921

Tool call payload: A single PowerShell command of ~600 chars invoking python.exe -c "import ast; ast.parse(...); ast.parse(...); print('OK')" to syntax-check two files.

Observations:

The streaming stall warning is firing as designed — good.
During the stall, no UI indication is shown to the user (no "still streaming…" or partial progress). The user reasonably interprets the silence as a freeze.
This is intermittent — other tool calls in the same session arrived in <2s.

Suggestions:

Surface the streaming stall to the user in the UI when it crosses a threshold (e.g., >30s), so they know waiting is the right action.
If possible, log whether the stall was server-side (API not sending) vs. network (client not receiving).

What Should Happen?

Minimal delay

Error Messages/Logs

2026-05-02 14:53:44.158 [info] Received message from webview: {"type":"request","requestId":"nofyo2316dq","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":true,"hasUnseenCompletion":false}}
2026-05-02 14:53:44.160 [info] Received message from webview: {"type":"request","requestId":"cmw9r7xecbi","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"waiting_input","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:44.160 [info] Received message from webview: {"type":"request","requestId":"fkdrunf4s1n","request":{"type":"show_notification","message":"Claude is requesting permission to use PowerShell","severity":"info","buttons":["View"],"onlyIfNotVisible":true}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"o0ot9i4w6y","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"nb23r2ia7ah","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"running","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:47.065 [info] Received message from webview: {"type":"request","requestId":"f11pqseq0cs","request":{"type":"rename_tab","title":"Install Miniconda and mi…","hasPendingPermissions":false,"hasUnseenCompletion":false}}
2026-05-02 14:53:47.066 [info] Received message from webview: {"type":"request","requestId":"1xerlzy3s1v","request":{"type":"update_session_state","sessionId":"d5a5a7d1-17a1-46b5-83a1-6eb0e946cdd0","state":"running","title":"Install Miniconda and migrate from Anaconda 3"}}
2026-05-02 14:53:47.069 [info] Received message from webview: {"type":"response","requestId":"c5509810532d5d6d3b35e76b35a93863","response":{"type":"tool_permission_response","result":{"behavior":"allow","updatedInput":{"command":"$pkgs = @('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'); $freeze = Get-Content anaconda_pip_freeze.txt; foreach ($p in $pkgs) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if ($line) { $line } else { \"$p : NOT FOUND in pip freeze\" } }","description":"Extract versions of project's third-party packages"},"updatedPermissions":[{"type":"addRules","rules":[{"toolName":"PowerShell","ruleContent":"$pkgs = @('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'); $freeze = Get-Content anaconda_pip_freeze.txt; foreach ($p in $pkgs) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if ($line) { $line } else { \"$p : NOT FOUND in pip freeze\" } }"}],"behavior":"allow","destination":"session"}]}}}
2026-05-02 14:53:47.081 [info] From claude: 2026-05-02T21:53:47.080Z [DEBUG] Applying permission update: Adding 1 allow rule(s) to destination 'session': ["PowerShell($pkgs = @\\('numpy','pandas','scipy','matplotlib','tqdm','xlwings','pywin32'\\); $freeze = Get-Content anaconda_pip_freeze.txt; foreach \\($p in $pkgs\\) { $line = $freeze | Where-Object { $_ -match \"^$p==\" }; if \\($line\\) { $line } else { \"$p : NOT FOUND in pip freeze\" } })"]

2026-05-02 14:53:47.082 [info] From claude: 2026-05-02T21:53:47.082Z [INFO] [Stall] tool_dispatch_start tool=PowerShell toolUseId=toolu_01SyE41Q2YSNLrjunnXNgWv9 permissionDecisionMs=153827

Steps to Reproduce

Claude trying to call a Powershell script with a long string.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.126 Claude Code

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

Surface the streaming stall to the user in the UI when it crosses a threshold, such as 30 seconds, to indicate that the system is still processing.

Guidance

  • Identify the threshold for a streaming stall, e.g., 30 seconds, and display a UI indication to the user when this threshold is crossed.
  • Log whether the stall was server-side (API not sending) or network-related (client not receiving) to aid in debugging.
  • Review the tool call payload and the PowerShell command being executed to ensure it is not causing unnecessary delays.
  • Consider optimizing the PowerShell command or splitting it into smaller, more manageable parts to reduce processing time.

Example

No specific code example is provided, as the issue is more related to the UI and logging rather than a specific code fix.

Notes

The exact cause of the streaming stall is not specified, so these suggestions are based on the information provided. Further investigation into the API, network, and tool call payload may be necessary to fully resolve the issue.

Recommendation

Apply a workaround by surfacing the streaming stall to the user in the UI when it crosses a threshold, as this will provide immediate feedback and improve the user experience while the root cause is being investigated.

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] Streaming stall: 150s gap mid-tool-call, no UI feedback during gap [1 comments, 2 participants]