bug: closing opencode while in zellij breaks keyboard input #282

Closed
opened 2026-02-16 17:26:02 -05:00 by yindo · 8 comments
Owner

Originally created by @jelenv on GitHub (Jun 25, 2025).

Originally assigned to: @adamdotdevin on GitHub.

system info

  • opencode 0.1.133 (installed via bun i -g)
  • OS: ubuntu 25.04 x64, wayland
  • terminal (happens in both): alacritty 0.15.1, ghostty 1.1.3
  • zellij 0.42.2

reproduction steps

  1. open alacritty or ghostty
  2. open zellij
  3. open opencode
  4. close opencode by keyboard keybind (I have it bound to Ctrl+D)
  5. press ctrl+c (for example)
  6. shell does not receive the ctrl+c but instead writes out 9;133

Same thing happens with other keys and modifier + key combinations. More examples: enter, backspace, shift+backspace, ...

workaround solution

Current solution I found is only to close zellij and open it again (or close alacritty/ghostty and open again).

note

I am not sure if this issue is caused by opencode or zellij or alacritty/ghostty. However this is the first time this happened to me and I was not able to reproduce with any other program (tried nvim, amp).

Originally created by @jelenv on GitHub (Jun 25, 2025). Originally assigned to: @adamdotdevin on GitHub. ### system info - opencode 0.1.133 (installed via bun i -g) - OS: ubuntu 25.04 x64, wayland - terminal (happens in both): alacritty 0.15.1, ghostty 1.1.3 - zellij 0.42.2 ### reproduction steps 1. open alacritty or ghostty 2. open zellij 3. open opencode 4. close opencode by keyboard keybind (I have it bound to Ctrl+D) 5. press ctrl+c (for example) 6. shell does not receive the ctrl+c but instead writes out `9;133` Same thing happens with other keys and modifier + key combinations. More examples: enter, backspace, shift+backspace, ... ### workaround solution Current solution I found is only to close zellij and open it again (or close alacritty/ghostty and open again). ### note I am not sure if this issue is caused by opencode or zellij or alacritty/ghostty. However this is the first time this happened to me and I was not able to reproduce with any other program (tried nvim, amp).
yindo closed this issue 2026-02-16 17:26:02 -05:00
Author
Owner

@thdxr commented on GitHub (Jun 25, 2025):

i think this involves handling SIGTERM properly?

@thdxr commented on GitHub (Jun 25, 2025): i think this involves handling SIGTERM properly?
Author
Owner

@danriedl commented on GitHub (Jul 7, 2025):

Related: #535

@danriedl commented on GitHub (Jul 7, 2025): Related: #535
Author
Owner

@jimsynz commented on GitHub (Aug 7, 2025):

Probably also related to https://github.com/zellij-org/zellij/issues/4333

@jimsynz commented on GitHub (Aug 7, 2025): Probably also related to https://github.com/zellij-org/zellij/issues/4333
Author
Owner

@towry commented on GitHub (Aug 8, 2025):

Image

Maybe the same issue, with

  • opencode 0.4.1
  • zellij 0.43.0 (with kitty keyboard protocol setting ON)
  • ghostty
  • macos
@towry commented on GitHub (Aug 8, 2025): <img width="803" height="241" alt="Image" src="https://github.com/user-attachments/assets/cd2e3f82-558e-486b-99f2-b41b28b1e6ba" /> Maybe the same issue, with - opencode 0.4.1 - zellij 0.43.0 (with kitty keyboard protocol setting ON) - ghostty - macos
Author
Owner

@2asoft commented on GitHub (Aug 8, 2025):

This looks like the same issue. You can check by running reset in the terminal, after which behaviour should return to normal.

By the way, the fix was just merged to Zellij.

@2asoft commented on GitHub (Aug 8, 2025): This looks like the same issue. You can check by running `reset` in the terminal, after which behaviour should return to normal. By the way, the [fix](https://github.com/zellij-org/zellij/issues/4333) was just merged to Zellij.
Author
Owner

@towry commented on GitHub (Aug 8, 2025):

can confirm zellij 0.43.1 fixed it.

@towry commented on GitHub (Aug 8, 2025): can confirm zellij 0.43.1 fixed it.
Author
Owner

@2asoft commented on GitHub (Aug 17, 2025):

It's been a week, and I've not run into the issue since upgrading Zellij to 0.43.1. I think this can be safely closed as resolved.

@2asoft commented on GitHub (Aug 17, 2025): It's been a week, and I've not run into the issue since upgrading Zellij to 0.43.1. I think this can be safely closed as resolved.
Author
Owner

@rekram1-node commented on GitHub (Aug 17, 2025):

@2asoft thank you I will close!

@rekram1-node commented on GitHub (Aug 17, 2025): @2asoft thank you I will close!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#282