-
Couldn't load subscription status.
- Fork 2.2k
Open
Description
Summary
- On OpenCode 0.15.0 and later, the CLI launched with
opencode run <prompt>never returns control to the shell; it finishes streaming output but the process keeps running until interrupted withCtrl+C. - In the interactive TUI on the same versions, issuing
/exitor pressingCtrl+Ccloses the interface visually, yet the terminal prompt never comes back—the process must still be terminated withCtrl+C. - Downgrading to 0.14.7 immediately restores the correct behaviour, confirming this is a regression introduced in the 0.15.0 line.
Steps to Reproduce
Scenario A – opencode run
- Install OpenCode 0.15.0 or later.
- Run
opencode run "say hello" --print-logsinside a project directory. - Wait for the response to finish streaming.
- Observe that the command never exits back to the shell; the cursor sits on a blank line until you press
Ctrl+C.
Scenario B – TUI /exit
- Start the interactive TUI (
opencode <path|project>). - After the assistant finishes a task, enter
/exitor pressCtrl+Cto leave the session. - The TUI clears and disappears, but the shell prompt does not return; pressing
Ctrl+Cis still required to regain control.
Expected Behavior
opencode runshould terminate automatically once the assistant finishes processing the prompt./exitorCtrl+Cinside the TUI should gracefully shut down the session and immediately return the shell prompt.
Actual Behavior
opencode runstays attached to the session indefinitely, leaving the terminal blocked until interrupted.- The TUI window closes, yet the underlying process continues running and the shell prompt never reappears on its own.
Environment
- OpenCode: 0.15.0, 0.15.1, 0.15.2 (works as expected on 0.14.7)
- Platforms tested:
- Windows 11 (WSL2 Ubuntu 24.04)
- Fedora 42 (bare metal)
- Shells/Terminals: Windows Terminal (WSL), GNOME Terminal and Ghostty on Fedora (bash and zsh)
Additional Notes
- Clearing caches, reinstalling, or switching providers/models does not resolve the hang.
--print-logsdoes not show any obvious error; logs end after the finalsession.prompt ... finish-stepentry.- Downgrading to 0.14.7 is the only workaround identified so far.
Metadata
Metadata
Assignees
Labels
No labels