Rider TUI - Ctrl+Z uses EOF - unable to return to session
Description
When using Ctrl+Z on Windows 11 under JetBrains Rider/IntelliJ, there is no option to return - terminal is suspended, not only opencode. Additionaly CTRL+C with radio button ends with typing any movement of the mouse
OpenCode version
v1.0.218
Steps to reproduce
- Open instance under IntelliJ engine TUI
- use Ctrl+Z
- Try to return
- Enter will disable any inputs
Screenshot and/or share link
Operating System
Windows 11
Terminal
Powershell 7 Reworked 2025
This issue might be a duplicate of existing issues. Please check:
- #3941: Terminal in JetBrains IDE doesn't work properly (can't type or paste multiline commands)
- #532: TUI isn't usable in Intellij's terminal
- #3737: OpenTUI: ctrl-z background controls are broken
- #5043: Suspend (ctrl + z) pauses api calls for all opencode instances
The core issue appears to be related to OpenCode's behavior in JetBrains IDEs with Ctrl+Z handling and terminal integration. These existing issues may have solutions or workarounds that could help.
Feel free to ignore if your specific case differs from these.
Clarification about Ctrl+Z on Windows (non-WSL environments)
This issue is not about broken POSIX job control.
On native Windows terminals (JetBrains Rider / IntelliJ terminal, PowerShell, cmd), Ctrl+Z does not send SIGTSTP and does not suspend the process. It is treated as EOF / input termination.
Because of that:
there is no suspended job,
fg / bg semantics do not exist,
the session cannot be resumed by design.
In Rider on Windows, pressing Ctrl+Z immediately breaks the TUI session because stdin is closed, not because OpenCode mishandles backgrounding.
So the problem is that the TUI appears to assume Unix-like job control even when running on native Windows, where this concept does not exist.
This should either:
disable Ctrl+Z handling entirely on non-WSL Windows, or
be documented as unsupported behavior in Windows IDE terminals (with an option to change keybindings)
For comparison, this works as expected in WSL or on Linux/macOS shells, where Ctrl+Z maps to SIGTSTP.
disable Ctrl+Z handling entirely on non-WSL Windows, or
I think this is reasonable