Skip to content

Text written during startup is dropped. #14415

Closed as not planned
Closed as not planned

Description

@TZubiri

Description

When running opencode, it takes a few seconds to launch, that's fine, acceptable.

However the bug is that whatever you write in that delay is lost instead of buffered.

I considered filing this as a feature request, instead of a bug. But what determines if this is a bug or a feature request is if there's additional work required to support this feature, or if this is a natural feature supported by the OS that is being lost somewhere due to an imprecision in the code.

Here's a small MVCE demonstrating a simple program that might or might not lose the buffer:

import time
time.sleep(5)
x = input("write")
print(x)

Will it lose the buffer? that is, if you write something in the first five seconds, will it be lost? How about if you write and press enter?

Turns out in both cases, the text typed is processed fine.

So the natural state of a program, at least on linux, is for the text sent during startup to be caught and not dropped.

This works even if piping io through using wsl or ssh.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    bug
    on Feb 20, 2026
  2. added
    opentui
    on Feb 20, 2026
  3. JosXa commented on Apr 3, 2026

    @JosXa
    Contributor

    Theme detection made this quite complicated, but here's a fix: #20934

    Could you try it out, maybe try to break the implementation?

  4. TZubiri commented on Apr 3, 2026

    @TZubiri
    Author

    Thank you for submitting a fix for this, it looks like it's failing ci tests though.

  5. TZubiri commented on Apr 3, 2026

    @TZubiri
    Author

    will try to break it tho

  6. removed
    bug
    opentui
    on May 3, 2026
  7. github-actions commented on Jul 4, 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