You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: OSC52 clipboard conflicts with Zellij auto-select-copy #14385
When running opencode inside Zellij with copy_on_select true, opencode's OSC52 writes interfere with Zellij's clipboard.
Zellij intercepts OSC52 sequences from child processes and routes them through its own clipboard pipeline instead of forwarding them to the outer terminal emulator. This means opencode's copy shortcut (Ctrl+X Y) never reaches the terminal's clipboard. Worse, it can overwrite whatever Zellij had just auto-copied from a text selection.
Steps to reproduce
Enable auto-select-copy in ~/.config/zellij/config.kdl: copy_on_select true
Run opencode inside Zellij
Select some text in the pane — Zellij copies it to the clipboard
Trigger opencode's copy shortcut (Ctrl+X Y)
Zellij intercepts the OSC52 sequence and overwrites the clipboard with opencode's content
Root Cause
writeOsc52() in packages/opencode/src/cli/cmd/tui/util/clipboard.ts writes to process.stdout. Zellij intercepts that sequence at the PTY layer and processes it internally — it does not forward it to the outer terminal emulator.
Writing to /dev/tty instead would bypass Zellij's PTY entirely, so the sequence goes straight to the outer terminal. This is the same approach used by lazygit and neovim, and it's exactly what PR #12129 proposes.
Activity
github-actions commentedon Feb 20, 2026
This issue might be a duplicate of existing issues. Please check:
Also note that PR #12129 (referenced in your issue) is already linked to #12082. You may want to follow that issue and PR for updates.
bnema commentedon Feb 20, 2026
Closing as duplicate of #12082