TUI becomes unresponsive upon running a non-terminating process such as a web server #493

Closed
opened 2026-02-16 17:27:04 -05:00 by yindo · 5 comments
Owner

Originally created by @zkdiff on GitHub (Jul 4, 2025).

Originally assigned to: @thdxr on GitHub.

Description

When running a non-terminating process (like a web server) within the TUI, the interface becomes unresponsive to normal input. The ESC key, which should interrupt the process, has no effect even when pressed repeatedly.

Current Behavior

  • The TUI freezes when a non-terminating process is started
  • Pressing ESC repeatedly does nothing to regain control
  • Slash commands still function properly (e.g., /details toggles the details view, /models lists available models)
  • The only way to regain control is to kill the process from another terminal

Steps to Reproduce

  1. Start opencode
  2. Run a non-terminating process (e.g., a web server on port 5173)
  3. Try to interrupt using ESC key - observe that it has no effect
  4. Open a second terminal
  5. Run lsof -i :5173 to find the PID of the server process
  6. Execute kill $pid to terminate the process
  7. Observe that opencode resumes normal operation

Expected Behavior

The ESC key (or another designated key combination) should interrupt the running process and return control to the TUI without requiring external intervention.

Screenshots

Before killing the process:

Image

After killing the process:

Image

Environment

  • OS: ubuntu
  • Version: 0.1.189
  • Terminal: VSCode integrated terminal
Originally created by @zkdiff on GitHub (Jul 4, 2025). Originally assigned to: @thdxr on GitHub. ## Description When running a non-terminating process (like a web server) within the TUI, the interface becomes unresponsive to normal input. The ESC key, which should interrupt the process, has no effect even when pressed repeatedly. ## Current Behavior - The TUI freezes when a non-terminating process is started - Pressing ESC repeatedly does nothing to regain control - Slash commands still function properly (e.g., `/details` toggles the details view, `/models` lists available models) - The only way to regain control is to kill the process from another terminal ## Steps to Reproduce 1. Start opencode 2. Run a non-terminating process (e.g., a web server on port 5173) 3. Try to interrupt using ESC key - observe that it has no effect 4. Open a second terminal 5. Run `lsof -i :5173` to find the PID of the server process 6. Execute `kill $pid` to terminate the process 7. Observe that opencode resumes normal operation ## Expected Behavior The ESC key (or another designated key combination) should interrupt the running process and return control to the TUI without requiring external intervention. ## Screenshots ### Before killing the process: ![Image](https://github.com/user-attachments/assets/9a94a2fc-b292-4f37-9670-1d2aaf9f5438) ### After killing the process: ![Image](https://github.com/user-attachments/assets/3661f840-24f2-4114-ac24-ee03f38b4a88) ## Environment - OS: ubuntu - Version: 0.1.189 - Terminal: VSCode integrated terminal
yindo closed this issue 2026-02-16 17:27:04 -05:00
Author
Owner

@zkdiff commented on GitHub (Jul 4, 2025):

Possibly related:
Image

When this exception is raised, the same behavior arise. It seems there might be some overlap in the underlying issue, but not necessarily.

@zkdiff commented on GitHub (Jul 4, 2025): Possibly related: ![Image](https://github.com/user-attachments/assets/e2d261ad-1a9f-4a66-a400-e7fae510eca7) When this exception is raised, the same behavior arise. It seems there might be some overlap in the underlying issue, but not necessarily.
Author
Owner

@dkarter commented on GitHub (Jul 4, 2025):

not sure if this is the same issue:

https://github.com/user-attachments/assets/e9f9a9c5-0e65-4d8e-8a84-07439c072663

@dkarter commented on GitHub (Jul 4, 2025): not sure if this is the same issue: https://github.com/user-attachments/assets/e9f9a9c5-0e65-4d8e-8a84-07439c072663
Author
Owner

@John0x commented on GitHub (Aug 13, 2025):

yeah, non terminating commands aren't supported yet, right?

@John0x commented on GitHub (Aug 13, 2025): yeah, non terminating commands aren't supported yet, right?
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Author
Owner

@arshbot commented on GitHub (Dec 29, 2025):

Experience this often, simple workaround is to instruct model to not run such commands and prompt user to run them.

@arshbot commented on GitHub (Dec 29, 2025): Experience this often, simple workaround is to instruct model to not run such commands and prompt user to run them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#493