Design the clipboard bridge between the mac and exe.dev VMs - #18
Open
nonreagent wants to merge 3 commits into
Open
nonreagent wants to merge 3 commits into
nonreagent wants to merge 3 commits into
Conversation
nonreagent
force-pushed
the
clipboard-bridge
branch
2 times, most recently
from
September 7, 2026 18:17
d43ca7d to
113e94a
Compare
nonreagent
marked this pull request as ready for review
September 7, 2026 18:52
Two flows: tmux copy-mode text to the mac clipboard (already works over OSC 52; drop the dead pbcopy pipe on Linux) and mac clipboard images into Claude Code inside remote tmux (pull on demand over a reverse ssh forward, launchd socket activation on the mac, a wl-paste shim on the VM). Records the probes that fixed the design and why clipfan was not adopted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Eight tasks across both repos: the wl-paste shim and its test here, the launchd responder, plist, ssh include and tmux change upstream, the two PRs, and the post-merge rebuild. Every task carries its test, exact file contents, and expected output, so it can run task-by-task in fresh sessions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude Code on Linux falls back to `wl-paste -l` and `wl-paste --type image/png` for ctrl+v once xclip fails without a display. The shim answers both by asking the mac through 127.0.0.1:2224, the port the mac's ssh config reverse-forwards into every exe.dev session, and declines every other call so text reads keep falling through. A python fake responder covers the protocol in test/clipboard-shim.test.sh. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nonreagent
force-pushed
the
clipboard-bridge
branch
from
September 7, 2026 20:07
ce90c16 to
0050fe4
Compare
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 traffic between a mac running kitty and an exe.dev VM running tmux only works in one direction. Text highlighted in tmux copy-mode reaches the mac clipboard (OSC 52, already working). An image on the mac clipboard cannot be pasted into Claude Code running inside tmux on the VM: Claude Code on Linux shells out to
xclip/wl-paste, the VM has no display server, and tmux swallows the replies of every in-band terminal clipboard protocol.Motivation
Agent sessions run remotely in tmux, and a screenshot is the fastest way to show Claude a UI problem. Today that means scp games. exe.dev's gateway was verified to relay reverse ssh forwards, which opens a clean out-of-band path.
Proposed Solution
The VM half of the clipboard bridge, plus its design: the spec (
docs/superpowers/specs/2026-09-07-clipboard-bridge-design.md, in this PR's files), the implementation plan, andoverlay/bin/wl-paste, a shim that answers the two calls Claude Code makes on ctrl+v (-l,--type image/png) by asking the mac over127.0.0.1:2224, the port the mac's ssh config reverse-forwards into every*.exe.xyzsession. It declines every other call so text reads fall through. A python fake responder covers the protocol intest/clipboard-shim.test.sh, wired intotest/run.sh.The mac half (socket-activated launch agent, ssh include, tmux
ycleanup) is a separate PR onnonrational/dotfiles; this PR is useful only once that one is deployed, and harmless before it (the shim fails closed).Feedback
ControlPersistkeeps the master and its forward alive;ssh -O exit <vm>.exe.xyzends it early), any VM process can read the mac clipboard image on demand. Text is never served and the bridge has no write path. Is image-only exposure acceptable for the agent VM?teeline if ever needed.