Rider TUI - Ctrl+Z uses EOF - unable to return to session #4027

Open
opened 2026-02-16 17:42:20 -05:00 by yindo · 4 comments
Owner

Originally created by @pawelel on GitHub (Dec 31, 2025).

Originally assigned to: @kommander on GitHub.

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

Image

OpenCode version

v1.0.218

Steps to reproduce

  1. Open instance under IntelliJ engine TUI
  2. use Ctrl+Z
  3. Try to return
  4. Enter will disable any inputs
    Image
Image

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Powershell 7 Reworked 2025

Originally created by @pawelel on GitHub (Dec 31, 2025). Originally assigned to: @kommander on GitHub. ### 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 <img width="1723" height="405" alt="Image" src="https://github.com/user-attachments/assets/a0b20258-4df9-431a-b9f0-1864f168859b" /> ### OpenCode version v1.0.218 ### Steps to reproduce 1. Open instance under IntelliJ engine TUI 2. use Ctrl+Z 3. Try to return 4. Enter will disable any inputs <img width="333" height="88" alt="Image" src="https://github.com/user-attachments/assets/66213409-1469-410a-8990-bb260a6fc6a6" /> <img width="272" height="109" alt="Image" src="https://github.com/user-attachments/assets/df4d9b54-4d87-482b-8a80-f100e75506b9" /> ### Screenshot and/or share link <img width="681" height="454" alt="Image" src="https://github.com/user-attachments/assets/f18746b3-860f-40a0-9baf-937fcd822ca1" /> ### Operating System Windows 11 ### Terminal Powershell 7 Reworked 2025
yindo added the windowsopentuibug labels 2026-02-16 17:42:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 31, 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.

@github-actions[bot] commented on GitHub (Dec 31, 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.
Author
Owner

@pawelel commented on GitHub (Dec 31, 2025):

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.

@pawelel commented on GitHub (Dec 31, 2025): 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.
Author
Owner

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

disable Ctrl+Z handling entirely on non-WSL Windows, or

I think this is reasonable

@rekram1-node commented on GitHub (Dec 31, 2025): > disable Ctrl+Z handling entirely on non-WSL Windows, or I think this is reasonable
Author
Owner

@InCerryGit commented on GitHub (Jan 20, 2026):

It’s indeed quite tricky. I also ran into this issue today and couldn’t find a way to exit from "terminal_suspend" in Windows Terminal.
I temporarily modified the key bindings and disabled that function.

{
  "$schema": "https://opencode.ai/config.json",
  "keybinds": {
    "terminal_suspend": "none"
  }
}
@InCerryGit commented on GitHub (Jan 20, 2026): It’s indeed quite tricky. I also ran into this issue today and couldn’t find a way to exit from "terminal_suspend" in Windows Terminal. I temporarily modified the key bindings and disabled that function. ```json { "$schema": "https://opencode.ai/config.json", "keybinds": { "terminal_suspend": "none" } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4027