TUI stops responding to user input after first prompt
Description
The TUI is not responding for me. I can reproduce the error consistently on Pop OS 22.04 LTS desktop. The cursor continues to blink but when typing there are no characters accepted. The frozen input persists indefinitely (as far as I can tell). I tried reinstalling the binary with recent updates (to no avail).
As a test I tried spamming letters after submitting the prompt. I can see that the app continues to respond for several seconds/ms after the prompt is sent. The TUI freezes shortly after (seemingly when the response is ready from the LLM).
The bug appears to occur on several/all terminal emulators on this machine.
I cannot reproduce this externally on a different Ubuntu server.
Plugins
No response
OpenCode version
1.1.16
Steps to reproduce
Steps to reproduce (stdin from terminal):
opencode
what is 2+2?
the cursor now blinks but typing does nothing
Screenshot and/or share link
normal case:
when spamming letters after clicking Enter:
focusing the opencode app and typing more does not change the text in the text box
Operating System
Pop OS LTS 22.04
Terminal
Terminal, Kitty
This issue might be related to #8224: "Enter key doesn't submit prompt when @ autocomplete has no matches", which also involves TUI input handling issues after initial interactions.
However, your specific symptom (input freezing on Pop OS after the first prompt response while the cursor blinks) appears unique. A few things to check:
- Is this reproducible with different terminal emulators on the same Pop OS system?
- Does it happen immediately after receiving the LLM response, or is there a delay?
- Any error messages in the debug logs (try running with
--log-level debug)?
This may be environment or terminal emulator-specific.
I explicitly stated in the problem that it is not related to a particular terminal emulator. Yes this is reproducible across several terminal emulators (modern and traditional TTY). I tried terminal (default), kitty, and terminator (apt package).
It seems to stop responding to stdin as soon as LLM is done streaming repsponse.
I'll try debug mode and report back
using --log-level does not appear to report the error or any other info yet.
stderr is empty. the app works as expected from CLI interface. only TUI integration is broken from what i can tell (using opencode run --format json "...")
What if you just run opencode, no cmd and no arguments?
What if you just run
opencode, no cmd and no arguments?
Yes @kommander. That is how my reproduction is stated. run opencode with no flags. write a single prompt.
the input box no longer works. ctrl+c or ctrl+d doesn't work. nothing from stdin seems to be processed after a response is sent from the first prompt.
(on this particular machine. i'll stand up another pop os box w/ RDP after work to test a sterile environment)
I cannot reproduce on another Pop OS machine. Feel free to close for now (although I am still being affected on one machine.) I'll continue to update versions and debug. Thanks