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
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:
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