fix(clipboard): add OSC 52 fallback for SSH/tmux environments#7028
Open
wonderflow wants to merge 1 commit intoanomalyco:devfrom
Open
fix(clipboard): add OSC 52 fallback for SSH/tmux environments#7028wonderflow wants to merge 1 commit intoanomalyco:devfrom
wonderflow wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: ResultsNo duplicates found. The search for the current PR (7028: "fix(clipboard): add OSC 52 fallback for SSH/tmux environments") returned only the PR itself. While there are other clipboard-related PRs in the repository:
These are addressing different clipboard issues and platforms, not the same SSH/tmux OSC 52 fallback feature being implemented in PR #7028. |
This was referenced Jan 6, 2026
Closed
This was referenced Jan 15, 2026
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Clipboard copy operations (e.g., Ctrl+X Y to copy assistant message) silently fail when running opencode over SSH or in tmux on a remote Linux server without X11/Wayland display.
Root cause: The fallback path uses clipboardy, which relies on xsel/xclip and requires a local display ($DISPLAY or $WAYLAND_DISPLAY). In headless SSH/tmux environments, these tools aren't available or don't work, causing clipboard operations to fail silently.
Solution
Add OSC 52 escape sequence support as a fallback when clipboardy fails.
OSC 52 is a terminal escape sequence standard that allows applications to set the system clipboard through the terminal emulator. It's supported by:
Changes
Behavior
No breaking changes - existing behavior preserved for all native clipboard methods.
Testing
Prerequisite