Skip to content

bug: OpenCode error runs show empty message body #146

@nathanschram

Description

Description

When OpenCode encounters an error (e.g. reading a nonexistent file), the completion message shows error · opencode · 34s · step 1 with an empty body — no error message or explanation is visible to the user.

Reproduction

  1. Send read the file /nonexistent/impossible/path.txt to the OpenCode dev chat
  2. OpenCode runs, encounters the error
  3. Completion message shows: error · opencode · 34s · step 1 followed directly by the footer (dir, resume line, cost)
  4. No error description between the status line and footer

Expected behaviour

The error message or at least a brief description of what went wrong should be visible to the user, similar to how Claude ("That file doesn't exist"), Codex, Pi, and Gemini all show explanatory text.

Comparison

Engine Error handling
Claude "That file doesn't exist" ✅
Codex "path does not exist" ✅
OpenCode (blank)
Pi Detailed explanation ✅
Gemini "outside the workspace boundaries" ✅

Possible cause

OpenCode may exit with a non-zero code without producing an answer in its final events. The CompletedEvent gets error status but no answer text. The runner may need to capture stderr or the last text output as the error message.

Environment

  • v0.35.0rc6, @untether_dev_bot, OpenCode engine

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions