[BUG] VS Code extension stream stalls at ~660-700 bytes with "Unhandled case: [object Object]" error
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 Claude Code VS Code extension consistently fails with "Unhandled case: [object Object]" error during streaming responses. The stream starts, receives ~660-700 bytes, then stalls for 15+ seconds before being marked as failed with sdk_stream_ended_no_result had_error:true.
Critically, the underlying operations often DO complete successfully (file edits are written, tools dispatch correctly), but the extension shows the error popup prematurely. This makes the error misleading — work succeeds but the UI reports failure.
The same operations work fine when running claude from the terminal, which strongly suggests the bug is in the VS Code extension layer, not the SDK or API.
What Should Happen?
Streaming should complete fully without stalling. If a stall occurs, the error popup should not appear when underlying tool operations actually succeeded. Terminal Claude Code handles the same requests without any issues.
Error Messages/Logs
[WARN] [Stall] stream_idle_partial lastChunkAgeMs=15011 bytesTotal=662 idleDeadlineMs=300000
[INFO] sdk_stream_ended_no_result had_error:true subagent_count:0 message_count:232
[WARN] Streaming stall detected: 54.2s gap between events (stall #1)
[INFO] tool_dispatch_end tool=Edit outcome=ok durationMs=4
[DEBUG] File written atomically ← operation succeeded despite error popup
[WARN] Streaming completed with 1 stall(s), total stall time: 54.2s
Steps to Reproduce
- Open Claude Code VS Code extension
- Resume any session with significant context (in my case, sessions of 34, 63, 178, 232 messages all fail)
- Send any message that triggers a longer response or tool use
- Observe streaming stall in logs at consistently ~660-700 bytes
- Error popup "Unhandled case: [object Object]" appears
- Underlying tool operations still complete successfully
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.141 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Issue occurs exclusively in the VS Code extension. Terminal claude works perfectly with identical sessions.
- Stall byte count is highly consistent across different sessions and projects: 662, 663, 667, 696, 698, 703, 709, 732, 768 bytes — suggesting a buffer or timeout boundary in the extension.
- Tested across multiple projects with sessions ranging from 34 to 511 messages — all fail.
- Previously had Avast antivirus performing SSL inspection (CRYPT_E_NO_REVOCATION_CHECK confirmed). Removed Avast completely — issue persists only in VS Code extension.
- Network confirmed clean: curl to api.anthropic.com responds in 0.24s, 100% data received, no SSL errors.
- NODE_TLS_REJECT_UNAUTHORIZED=0 added to ~/.claude/settings.json — no effect on VS Code extension.
- Windows Defender active, no other antivirus installed.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗