OSC 52 copy from Claude TUI doesn't reach clipboard inside tmux (regression in 2.1.146–2.1.153)

Resolved 💬 0 comments Opened May 28, 2026 by mikaelh Closed May 28, 2026

Environment

  • Claude Code 2.1.153 (commit 6cfd211761f3), latest channel
  • Stable is 2.1.145 — last known-good version
  • Platform: linux-x64, running inside a VS Code devcontainer
  • Host: Windows 11, WSL2, Windows Terminal (latest stable, "Allow OSC 52 to write to clipboard" enabled)
  • Launched via: devcontainer exec -- tmux new -s <name> claude --allow-dangerously-skip-permissions ...

Steps to reproduce

  1. From Windows Terminal, exec into a devcontainer and start claude inside a fresh tmux session.
  2. In the Claude pane, mouse-select any text from the conversation.
  3. Claude prints: sent 75 characters via OSC 52 - check terminal clipboard settings if paste fails.
  4. Paste anywhere on Windows — clipboard is unchanged (still holds whatever was there before the selection).

Expected

Selected text lands in the Windows clipboard, same as any other application emitting OSC 52 through tmux.

Actual

OSC 52 emission from Claude is silently dropped somewhere between Claude and the outer terminal. Clipboard never receives the bytes.

What's confirmed working (rules out the obvious)

  • A sibling bash pane in the same tmux session copies fine via mouse-select — so tmux's set-clipboard on pass-through and Windows Terminal's OSC 52 acceptance are working end-to-end.
  • Shift+select in the Claude pane works — bypasses Claude's mouse tracking and lets tmux handle the selection directly. So the failing path is specifically Claude's own copy emission.
  • Worked yesterday; problem appeared after a Windows reboot, at which point Claude relaunched and presumably pulled a newer latest build.

Suspected cause

Something about how Claude formats / terminates its OSC 52 sequence (or routes it through its TUI layer) is no longer being recognized by tmux's set-clipboard on pass-through. Regression window: 2.1.146 → 2.1.153.

Workaround

Shift+select bypasses the broken path; stable channel (2.1.145) presumably unaffected.

View original on GitHub ↗