VSCode extension: webview crashes with "Unhandled case: [object Object]" after AskUserQuestion in Auto mode; task completes in background
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?
Environment
Claude Code VSCode extension: 2.1.141 (win32-x64)
OS: Windows 11 Home, 10.0.26200
Permission mode: Auto mode
Model: claude-opus-4-7[1m]
What happens
During longer sessions in Auto mode, the conversation view freezes and an orange banner appears at the top: "Unhandled case: [object Object]" with "View output logs · Troubleshooting resources" links. The conversation appears stuck/dead in that window.
However, the agent process keeps running in the background — the task actually completes. Reopening the same conversation in a new window shows it finished successfully. So work isn't lost, but the UI is unrecoverable in the original window and gives no indication the task is still progressing.
Trigger pattern
It consistently breaks right after an AskUserQuestion round-trip completes (user answers a question, agent resumes). The output log shows, at that moment:
[DEBUG] toAutoClassifierInput failed for AskUserQuestion: undefined is not an object (evaluating 'H.questions.map')
and the session ends with:
log_event: sdk_stream_ended_no_result { had_error: true, ... }
sdk_stream_ended_no_result with had_error: true appears 13 times across my recent sessions. The toAutoClassifierInput failed error appears for AskUserQuestion specifically — looks like the Auto-mode classifier's input transform doesn't handle the AskUserQuestion payload shape (H.questions is undefined).
What Should Happen?
<img width="3830" height="1974" alt="Image" src="https://github.com/user-attachments/assets/f5ed1796-4158-4305-a88e-339cdcfd02a9" />
Task should normally get processed as it usually does
Error Messages/Logs
"Unhandled case: [object Object]"
Steps to Reproduce
Steps to reproduce
Enable Auto mode
Run a longer session (mine were 150–550+ messages)
Have the agent call AskUserQuestion and answer it
Webview crashes with "Unhandled case: [object Object]"
Expected
The classifier should handle (or safely skip) AskUserQuestion actions without throwing, and a render error in the webview should not freeze the conversation with no recovery path.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code VSCode extension: 2.1.141 (win32-x64)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Workaround
Switching out of Auto mode avoids it (the failing toAutoClassifierInput path isn't exercised). Reloading the window recovers the completed state.
Notes
Reinstalling the extension did not help (same version reinstalled; appears to be a runtime bug, not a corrupted install).Steps to reproduce
Enable Auto mode
Run a longer session (mine were 150–550+ messages)
Have the agent call AskUserQuestion and answer it
Webview crashes with "Unhandled case: [object Object]"
Expected
The classifier should handle (or safely skip) AskUserQuestion actions without throwing, and a render error in the webview should not freeze the conversation with no recovery path.
Workaround
Switching out of Auto mode avoids it (the failing toAutoClassifierInput path isn't exercised). Reloading the window recovers the completed state.
Notes
Reinstalling the extension did not help (same version reinstalled; appears to be a runtime bug, not a corrupted install).
<img width="3830" height="1974" alt="Image" src="https://github.com/user-attachments/assets/68efd0df-f0b6-448f-9710-c6732b52442a" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗