claude-code - 💡(How to fix) Fix OSC 52 copy from Claude TUI doesn't reach clipboard inside tmux (regression in 2.1.146–2.1.153)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Workaround

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

RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING