Skip to content

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

Closed

Description

@jelenv

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).

Activity

  1. assigned and unassigned on Jun 25, 2025
  2. thdxr commented on Jun 25, 2025

    @thdxr
    Member

    i think this involves handling SIGTERM properly?

  3. danriedl commented on Jul 7, 2025

    @danriedl

    Related: #535

  4. jimsynz commented on Aug 7, 2025

    @jimsynz

    Probably also related to zellij-org/zellij#4333

  5. towry commented on Aug 8, 2025

    @towry
    Image

    Maybe the same issue, with

    • opencode 0.4.1
    • zellij 0.43.0 (with kitty keyboard protocol setting ON)
    • ghostty
    • macos
  6. 2asoft commented on Aug 8, 2025

    @2asoft
    Contributor

    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.

  7. towry commented on Aug 8, 2025

    @towry

    can confirm zellij 0.43.1 fixed it.

  8. 2asoft commented on Aug 18, 2025

    @2asoft
    Contributor

    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.

  9. rekram1-node commented on Aug 18, 2025

    @rekram1-node
    Collaborator

    @2asoft thank you I will close!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions