VSCode extension v2.1.141 renders 'Unhandled case: [object Object]' instead of MCP server error messages

Resolved 💬 3 comments Opened May 14, 2026 by vikashkodati Closed May 15, 2026

Summary

After upgrading to Claude Code VSCode extension v2.1.141 (auto-upgrade from v2.1.11), the chat panel header/title and various surfaces display Unhandled case: [object Object] with a "View output logs · Troubleshooting resources" link.

Environment

  • VSCode extension: anthropic.claude-code-2.1.141-darwin-arm64
  • Previously installed: anthropic.claude-code-2.1.11-darwin-arm64 (marked obsolete after auto-upgrade)
  • Platform: macOS 26 (Darwin 25.4.0), arm64
  • Model in session: Opus 4.7 (1M)

Repro

  1. Have one or more MCP servers that fail to start (e.g., misconfigured path, missing env var, OAuth 404 on a cloud connector)
  2. Launch Claude Code extension in VSCode
  3. UI surfaces Unhandled case: [object Object] in place of a real error message

In my case, the failing MCPs were:

  • A stdio MCP (excalidraw) pointing at a non-existent file path → MODULE_NOT_FOUND
  • A plugin MCP (github) missing GITHUB_PERSONAL_ACCESS_TOKENAuthorization header is badly formatted
  • A cloud connector (W&B) returning HTTP 404: Invalid OAuth error response
  • A cloud connector (Figma) returning Anthropic Proxy: Invalid content from server

Expected

A descriptive error message identifying the failing MCP server and the root cause, the way v2.1.11 rendered them.

Likely cause

Looks like an enum exhaustiveness gap — a TS switch over a discriminated error union has a default that prints Unhandled case: ${error}, but error is an object so it stringifies as [object Object]. New error variants in v2.1.141 don't have render cases.

Workaround

Cleaning up the failing MCP configs suppresses the symptom, but the UI fallback should never render [object Object].

Logs

From ~/Library/Application Support/Code/logs/<ts>/window1/exthost/Anthropic.claude-code/Claude VSCode.1.log:

[ERROR] "MCP server \"excalidraw\" Server stderr: ... Cannot find module ... MODULE_NOT_FOUND"
[ERROR] MCP server "github" Connection failed: Streamable HTTP error: ... Authorization header is badly formatted
[ERROR] MCP server "wandb" Connection failed: HTTP 404: Invalid OAuth error response
[ERROR] MCP server "claude.ai Figma" Connection failed: ... Anthropic Proxy: Invalid content from server

View original on GitHub ↗

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