Skip to content

Bug: Stdin piping breaks UI #3871

Closed

Description

@zenyr

Description

I was very happy to finally see the piping feature landing via f501501 so I immediately tried. 😊

OpenCode version

1.0.20

Steps to reproduce

Use stdout pipe

  • echo Hi | opencode
  • Breaks

Screenshot and/or share link

Image Image

oof

Operating System

macOS Sequoia 15.6.1 arm64

Terminal

Ghostty 1.3.0-main+3f75c66e8

Activity

  1. added
    bugSomething isn't working
    on Nov 4, 2025
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 4, 2025
  3. rekram1-node commented on Nov 4, 2025

    @rekram1-node
    Collaborator

    I guess it was breaking before and it still breaks

  4. self-assigned this
    on Nov 4, 2025
  5. kunaljaykam commented on Nov 4, 2025

    @kunaljaykam

    it does work fine with; echo 'Hi' | opencode run

    the easy fix would probably be to add this error log; Cannot run TUI with piped input. Use 'opencode run' instead: echo 'Hi' | opencode run

  6. richard-hajek commented on Nov 4, 2025

    @richard-hajek

    Might be relevant: https://stackoverflow.com/questions/6868296/whats-the-difference-between-stdin-and-tty-at-all

    tldr:
    if user wants to maintain TUI but also pipe in some data, app must open /dev/tty and read from that

  7. kunaljaykam commented on Nov 5, 2025

    @kunaljaykam

    i see it’s already assigned, but i’d like to help or take over if that’s okay. @kommander

  8. veracioux commented on Nov 5, 2025

    @veracioux
    Contributor

    @kunaljaykam Sorry I started working on this before I saw your comment. I think I saved you a bit of headache tho.

  9. fabioalmeidaweb commented on Nov 5, 2025

    @fabioalmeidaweb

    Same issue here.

    • Alacritty
    • Arch Linux (omarchy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions