Unhandled case: [object Object] banner halts agent execution mid-run

Open 💬 5 comments Opened May 14, 2026 by tim-donaghy-ls

Version: Claude Code 2.1.140 (VS Code native extension)
OS: macOS 15 (Darwin 24.6.0)

Symptom

A red error banner reading Unhandled case: [object Object] appears at the top of the chat. When it appears, the active agent run halts and the response stream stops. The banner links to "View output logs · Troubleshooting resources."

Impact

The error has reproduced across multiple turns in the same session. Each occurrence interrupts in-flight work — long-running Bash commands, file edits, and agent tasks lose progress and have to be re-run, duplicating both time and API cost.

Likely cause

The [object Object] substring strongly suggests an unstringified Error or response object reaching a UI error handler. Calling JSON.stringify(err, Object.getOwnPropertyNames(err)), or surfacing err.message / err.stack, would at least make this diagnosable from the user side.

Repro

Not yet reduced to a minimal case — occurs during normal multi-turn agent sessions in the VS Code extension while running Bash + Python (openpyxl) workloads. A screenshot of the banner is available on request.

Ask

  1. Stop the error from halting agent execution (degrade gracefully so the in-flight run completes).
  2. Replace [object Object] with the actual error string so users can self-diagnose or attach it to bug reports.

View original on GitHub ↗

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