[BUG] [BUG] VS Code extension: "Unhandled case: [object Object]" while reading combined output of two long-running background dev servers (git worktree workflow)

Resolved 💬 4 comments Opened May 14, 2026 by CCAANZ-hub Closed May 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The red banner Unhandled case: [object Object] (with "View output logs · Troubleshooting resources" links) appears in the chat panel mid-turn while the agent is processing the combined output of two concurrently-running background processes started inside a git worktree. The chat panel becomes unresponsive — the "Thinking…" indicator is visible but never resolves. Developer: Reload Window is the only recovery; the underlying CLI session/transcript appears intact after reload.
This matches the symptom described in #58984 (webview renderer hits an unhandled discriminated-union case while the host process is fine), but the trigger pattern is distinct from the existing reports: it is not a long conversation history, not an image follow-up, not Bedrock, and not a malformed tool-input type. It reproduces consistently in a git-worktree + concurrent background dev servers workflow.

What Should Happen?

The renderer should either:

Render the unrecognised event variant as a generic tool/stream message and continue, or
Log the full object (not stringify to [object Object]) so the actual offending event variant can be identified

…rather than entering a permanent stall state.

Error Messages/Logs

Steps to Reproduce

  1. Open a Cloudflare Workers project in VS Code with the Claude Code extension.
  2. Ask Claude Code to set up a parallel git worktree for a branch (e.g. git worktree add ../<repo>-otp -b fix/<branch>)
  3. In the same turn, ask it to start the web dev server and the worker dev server as separate background processes inside the new worktree.
  4. Engineer (or wait for) one of the two background processes to fail at startup — port conflict, missing env var, or wrangler.toml issue all work.
  5. Ask Claude Code to "check what happened" — it will typically issue a single combined tail/head bash call across both output files.
  6. Observe the red Unhandled case: [object Object] banner appear shortly after that bash call returns. The chat panel stops rendering; "Thinking…" persists indefinitely.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.141

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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