Skip to content

fix(coding-agent): pass OSC 52 through tmux - #1211

Open
chupe wants to merge 2 commits into
code-yeongyu:mainfrom
chupe:fix/tmux-clipboard-passthrough
Open

fix(coding-agent): pass OSC 52 through tmux#1211
chupe wants to merge 2 commits into
code-yeongyu:mainfrom
chupe:fix/tmux-clipboard-passthrough

Conversation

@chupe

@chupe chupe commented Aug 30, 2026

Copy link
Copy Markdown

Problem

Remote clipboard writes emitted raw OSC 52. tmux could consume it without forwarding it through SSH, so /copy and fullscreen selection reported success while the workstation clipboard stayed unchanged.

Solution

Probe the effective #{allow-passthrough} value for the current pane. When enabled, wrap OSC 52 with the existing wrapTmuxPassthrough() helper. Keep raw OSC 52 outside tmux and when passthrough is disabled or unavailable, preserving the set-clipboard on path.

Testing

  • npm --prefix packages/coding-agent test -- test/clipboard.test.ts (12/12)
  • npm run check
  • Senpi QA tmux TUI smoke (5/5)
  • Real tmux passthrough-on transport to the outer client
  • Real tmux passthrough-off fallback through set-clipboard on

Full npm test exceeded the 30-minute limit. The run also hit missing @earendil-works/pi-tui dist resolution under packages/ai in the no-lifecycle checkout.


Summary by cubic

Passes OSC 52 clipboard writes through tmux's DCS passthrough so remote /copy and fullscreen selection actually reach the workstation clipboard instead of being swallowed by tmux.

Changes

  • Probes #{allow-passthrough} and wraps the escape sequence with wrapTmuxPassthrough() when enabled.
  • Falls back to raw OSC 52 outside tmux or when passthrough is disabled, preserving the set-clipboard on path.
  • Replaces timer-based clipboard test waits with explicit native-write completion and adds passthrough-enabled and disabled remote tmux cases.

Written for commit 6fb3c13. Summary will update on new commits.

Review in cubic

chupe added 2 commits August 30, 2026 03:02
Preserve both utils tracker entries and replace clipboard test timer waits with explicit native-write completion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant