Unhandled case: [object Object]` banner on every turn in v2.1.141 (VS Code extension)

Resolved 💬 8 comments Opened May 14, 2026 by ebravo72 Closed May 15, 2026

Unhandled case: [object Object] banner on every turn in v2.1.141 (VS Code extension)

Summary

The VS Code extension shows a red error banner reading Unhandled case: [object Object] in the conversation header. It is dismissable, but reappears on virtually every new turn — I have seen it ~10 times today across multiple sessions, on a freshly rebooted Mac.

The chat panel keeps working otherwise, but the banner is alarming and may indicate dropped stream content.

Environment

  • Extension version: anthropic.claude-code 2.1.141 (latest on Marketplace)
  • VS Code: native VS Code on darwin-arm64 (macOS 15.4 / Darwin 25.4.0)
  • Model in use: claude-opus-4-7 (set via ~/.claude/settings.json)
  • Auth: OAuth / Pro plan
  • Several MCP servers configured (tradingview, Google Drive). Reproduces regardless.

Root cause (from the bundled webview source)

The banner comes from a default branch in the content-block-delta reducer inside webview/index.js. The reducer (minified as b20($, Z)) handles only these delta types:

  • text_delta
  • citations_delta
  • input_json_delta
  • thinking_delta
  • signature_delta
  • compaction_delta

Anything else falls through to:

function QB1($, Z) { throw Error(Z ?? `Unhandled case: ${$}`); }

Because $ es un delta object, string interpolation produces [object Object] — the exact banner text. So the backend (or the bundled CLI) is emitting a delta type that this version of the webview does not recognise. The default: QB1($) branch in the outer processStreamEvent switch (message_start, message_delta, content_block_*, message_stop) has the same pattern and could be a second trigger.

Reproduction

Not deterministic but very frequent. Sending almost any non-trivial prompt to Opus 4.7 in a fresh conversation triggers the banner within a few turns. Restarting VS Code and rebooting the host do not help (consistent with this being a client/server protocol mismatch rather than local state).

Logs

Relevant log file:

~/Library/Application Support/Code/logs/<TIMESTAMP>/window1/exthost/Anthropic.claude-code/Claude VSCode.log

There is also a recurring, possibly related, error (separate code path — included for completeness) appearing on every turn:

[DEBUG] MCP server "claude-vscode": tools/list failed (MCP error -32601: Method not found); retrying once
[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found

claude-vscode is an internal MCP server registered by the extension itself (it is not user-configured and does not show up in claude mcp list). It is consistently failing tools/list with -32601. This may or may not be what produces the Unhandled case delta — I have not been able to confirm causation from the bundled source alone.

Workaround

Switching the extension to terminal mode (claudeCode.useTerminal: true) avoids the webview path entirely and the banner disappears. The CLI itself appears unaffected.

Suggested fix

  • Add the missing delta type to b20 (or generally treat unknown delta types as no-ops instead of throwing).
  • Fix the claude-vscode internal MCP server so tools/list returns an empty array instead of -32601.
  • Improve the user-facing error rendering so the banner does not render objects with default toString — at minimum JSON.stringify the value to give a clue.

Happy to provide more log excerpts on request.

View original on GitHub ↗

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