Skip to content

Tool stderr leaks into message input field on bash timeout #31588

Description

@sn0wmann1

Description

When a bash command times out in OpenCode's CLI (e.g., sudo credential timeout), the multi-line stderr output leaks into the message input field — the area where the user types their messages. The text blocks the input buffer and requires pressing spacebar repeatedly to clear before typing works again.

This is distinct from the lack of sudo/stdin support (tracked in #9808, #8097, #18659). Even when the command failure is expected, output should never corrupt the input area.

Steps to Reproduce

  1. Run a bash command that hits the 30s sudo timeout (no cached credentials)
  2. OpenCode displays the timeout message in the output area
  3. The same text appears in the message input field below
  4. Must press spacebar to scroll through the entire string before the input becomes usable

Expected Behavior

Tool output stays in the output area. Input field remains clear and immediately usable regardless of tool output.

Environment

  • opencode: 1.16.2-1.1 (AUR)
  • OS: Arch Linux (CachyOS)
  • Terminal: kitty (Wayland)
  • Shell: fish 4.x
  • Desktop: Hyprland (Wayland)
  • No plugins or custom config (stock install)

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