Skip to content

TUI freeze and show stray ANSI escape codes with piped or redirected stdin #28538

@LordMikkel

Description

@LordMikkel

Description

What happened

Running opencode < instructions.txt or "echo hello | opencode" opens the TUI, but input becomes unusable (ANSI noise, no interaction).

Actual behavior

The TUI becomes unresponsive and shows stray ANSI characters.

Expected behavior

The prompt is auto-submitted and the TUIstays interactive.

Plugins

No response

OpenCode version

1.15.5

Steps to reproduce

  1. opencode < test-prompt.txt
  2. echo hello | opencode

Screenshot and/or share link

Image

Operating System

Linux (Arch)

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions