VSCode extension crashes with "Unhandled case: [object Object]" when model passes Read tool offset as array

Status Fixed / completed
Maintainer reply None cached
Activity 7 comments · opened May 14, 2026 · 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 ↗

7 Comments

GunarsK · 3 months ago

Same issue

ymoraviadev-droid · 3 months ago

same issue here too

SvenRieke · 3 months ago

Closing as duplicate of #58897. Specific repro details (Read tool offset-as-array trigger) added as a comment there.

ValverdeDaniel · 3 months ago

same issue here

dallinchase · 3 months ago

Same issue here

dragon375014 · 3 months ago

Same issue here

github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.