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
Clipboard copy broken in terminals without OSC52 support #11996
After #11744 introduced OSC52 clipboard support, clipboard copy stopped working in terminals that don't have OSC52 enabled.
The issue is in packages/opencode/src/cli/cmd/tui/util/clipboard.ts:
constcopied=renderer.copyToClipboardOSC52(text)if(copied)return// <-- early return skips native clipboard
copyToClipboardOSC52() returns true after writing the escape sequence, but the terminal may not actually support or process OSC52. The early return skips the native fallback (osascript on macOS, xclip on Linux).
Steps to Reproduce
Use a terminal with OSC52 disabled (e.g., iTerm2 without "Applications in terminal may access clipboard")
Try to copy text in OpenCode (e.g., <leader>y)
Clipboard is empty
Expected Behavior
Clipboard copy should work regardless of OSC52 support by always falling back to native methods.
Both issues relate to clipboard copy failures when OSC52 is not available or not working. The root cause appears to be similar: the early return after copyToClipboardOSC52() succeeds skips native clipboard fallbacks, leaving users without a working clipboard solution.
Feel free to ignore if your specific case is different, but these issues likely share the same underlying problem and solution.
Activity
github-actions commentedon Feb 3, 2026
This issue might be a duplicate of existing issues. Please check:
Both issues relate to clipboard copy failures when OSC52 is not available or not working. The root cause appears to be similar: the early return after
copyToClipboardOSC52()succeeds skips native clipboard fallbacks, leaving users without a working clipboard solution.Feel free to ignore if your specific case is different, but these issues likely share the same underlying problem and solution.
MartinWie commentedon Feb 3, 2026
Closing because the fix was already merged