Skip to content

error_during_execution / cancelled is shown as a raw Run error #549

Closed

Description

@currentbits

Problem

A claude-stream run (Claude or Grok) can end with this event in the transcript:

Run error: result subtype error_during_execution
cancelled

That is the raw stream-json result event dumped into the thread. The runner builds it here:

failText = `Run error: result subtype ${ev.subtype || "unknown"}`;
if (errors.length) {
  failText += `\n${errors.slice(-3).join("\n")}`;
}

(electron/runner.js, the type === "result" path.) subtype !== "success" always marks the thread failed and stores that string as lastError.

Session-lost (No conversation found) already gets a human follow-up line. cancelled does not. stopRun already leaves the thread idle with "Run stopped"; this path does the opposite for the same idea.

Impact

  • The user sees adapter jargon (result subtype …) instead of a reason they can act on.
  • A CLI-side cancel is treated as a crash: failed badge, Retry turn, lastError tooltip — not a stop.
  • Known producer of this exact subtype on Grok: a permission prompt with no channel auto-cancels the first gated tool (issue Grok provider runs fail immediately after first assistant message #3; asking modes are now mapped to auto in electron/providers.js). If this still appears, either that mapping missed a mode or some other cancel (MCP, quota, user interrupt that still emitted a result event) is taking this path.

Fix direction

Activity

  1. added
    bugSomething isn't working
    and removed on Aug 19, 2026
  2. added a commit that references this issue on Aug 19, 2026
  3. added and removed on Aug 20, 2026
  4. currentbits commented on Aug 20, 2026

    @currentbits
    OwnerAuthor

    Shipped on main (78fe3bf); verified in the tree. Moving to plan:done.

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 workingplan:donePlanboard status

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions