Skip to content

TUI ! bash commands should surface non-zero exit codes #31935

Closed as not planned
Closed as not planned

Description

@HaleTom

Description

When running a direct shell command via the TUI's ! prefix (Bash commands), there is no visible warning or indicator when the command exits with a non-zero code. The exit code is silently absorbed.

Current behavior

User types !some-command in the TUI, it exits with code 1, and the user has no way to know the command failed unless they read every line of the tool output (which may be truncated). The output does not prominently flag the failure.

Expected behavior

When a ! bash command exits with a non-zero code, the output should include a visible warning, e.g.:

[WARNING] Command exited with code 1

This should be appended to or prepended to the tool output so the user can see it immediately.

Why this matters

  • ! commands are direct user input — the user explicitly asked to run this command
  • Users cannot tell if the command succeeded or failed without reading every line of output
  • Long sessions with many commands make it easy to miss silent failures
  • The output is added to the conversation as a tool result, but the non-zero exit code is not surfaced

Context

The ! prefix is documented under "Bash commands" in the TUI docs: https://opencode.ai/docs/tui/ — "Start a message with ! to run a shell command. The output of the command is added to the conversation as a tool result."

Related

Activity

  1. changed the title [-]Shell tool should surface non-zero exit codes to the user[/-] [+]TUI `!` bash commands should surface non-zero exit codes[/+] on Jun 11, 2026
  2. github-actions commented on Aug 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions