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:

  1. The model occasionally generates a Read tool call with offset passed as an array (e.g., [1500]) instead of a plain number (1500).
  2. 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

  1. Use Claude Code VSCode extension in a long session with many Read tool calls
  2. Wait for the model to generate offset as [n] instead of n (intermittent)
  3. 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 offset as 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

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗