VSCode extension crashes with "Unhandled case: [object Object]" when model passes Read tool offset as array
Resolved 💬 7 comments Opened May 14, 2026 by SvenRieke Closed May 14, 2026
Bug Report
Summary
Two related bugs cause the VSCode extension session to get stuck:
- The model occasionally generates a
Readtool call withoffsetpassed as an array (e.g.,[1500]) instead of a plain number (1500). - When the tool input validator rejects this, the VSCode extension chat UI renders "Unhandled case: [object Object]" and freezes — no recovery without a window reload.
Steps to reproduce
- Use Claude Code VSCode extension in a long session with many
Readtool calls - Wait for the model to generate
offsetas[n]instead ofn(intermittent) - The chat UI immediately shows "Unhandled case: [object Object]" with "View output logs / Troubleshooting resources" links and becomes unresponsive
Evidence from logs
From exthost/Anthropic.claude-code/Claude VSCode.log:
Read tool input error: Read failed due to the following issue:
The parameter `offset` type is expected as `number` but provided as `array`
Occurred at least twice in a single session within ~5 minutes of each other.
Expected behavior
- Model: should always pass
offsetas a plain number - Extension: should gracefully display a tool error instead of crashing the session
Workaround
Ctrl+Shift+P → "Reload Window" resets the extension and unblocks the session.
Environment
- Claude Code VSCode extension (latest)
- VS Code on Linux (6.8.0 kernel)
- OAuth-authenticated session
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗