Skip to content

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

Closed as not planned

Description

@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.

Activity

  1. added
    bugSomething isn't working
    duplicateThis issue or pull request already exists
    platform:vscodeIssue specifically occurs in VS Code
    platform:macosIssue specifically occurs on macOS
    on May 14, 2026
  2. github-actions commented on May 14, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. VSCode extension: "Unhandled case: [object Object]" when stream stalls >15s during extended thinking (Opus 4.7) #59152
    2. UI shows "Unhandled case: [object Object]" toast when SDK stream ends with error after stall #59054
    3. [BUG] "Unhandled case: [object Object]" Intermittent stall errors when Claude asks operator a question. Similar to #59120 but specific trigger. #59142

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  3. DanielPVG commented on May 14, 2026

    @DanielPVG

    Same v2.1.141 macOS arm64 + VSCode 1.120.0 upgrade + cold start trigger.
    Symptoms:

    Output panel hardcoded --debug --debug-to-stderr CLI flags spawn behavior
    Duplicate MCP Server activation: ports 43183 + 42615 within 5 seconds
    Chat reply not rendering in webview after sending message
    "[DEBUG] Org fast mode: disabled (extra_usage_disabled)" on personal Max 5x subscription
    Workarounds tried: Cmd+Q quit + restart (clears duplicate processes temporarily but --debug flags remain hardcoded).

  4. whatl3y commented on May 20, 2026

    @whatl3y

    +1

  5. witteb-ssc commented on Jun 18, 2026

    @witteb-ssc

    same issue - confirmed june-17-2026

  6. github-actions commented on Jul 30, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  7. github-actions commented on Sep 23, 2026

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsplatform:macosIssue specifically occurs on macOSplatform:vscodeIssue specifically occurs in VS CodestaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions