[BUG] Mouse-selection copy (drag-release auto-copy) silently fails to reach the clipboard on Wayland when wl-clipboard/xclip/xsel are missing (2.1.222; same missing-backend path as /copy in #67486, bot-closed as dup of unrelated #62350)

Status Fixed / completed
Reported on v2.1.222
Maintainer reply None cached
Activity 2 comments · opened Aug 5, 2026 · closed Aug 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code 2.1.222
  • Ubuntu 26.04, GNOME on Wayland (XDG_SESSION_TYPE=wayland), GNOME Terminal (VTE 0.84), bash
  • Stock desktop: none of wl-copy / xclip / xsel installed — Ubuntu does not

preinstall wl-clipboard (#67486 reproduced the same on 24.04, so it spans releases)

What happens

Witnessed on this machine (2026-08-05, 2.1.222, no clipboard utility installed):

  • Fullscreen renderer, mouse drag-release auto-copy: appears to succeed —

selection renders, release gives no error — but the system clipboard is
untouched: pasting yields its stale previous content. Zero output anywhere
to suggest a failure.

  • After sudo apt install wl-clipboard and an app restart — same fullscreen

renderer — drag-release copy work immediately. Renderer identical
on both sides; the only changed variables were the package and the restart.

Not independently re-tested pre-install: /copy and /export → clipboard on a
utility-less system — their identical silent failure is what #67486 documented.

Real-world cost: the symptom masquerades as a hardware/terminal fault. We spent a
full debugging session ruling out mouse switch chatter (libinput debug-events),
Bluetooth vs USB link, battery, GNOME Terminal mouse-reporting, and
CLAUDE_CODE_DISABLE_MOUSE before finding the actual cause: a missing package
that nothing ever complained about.

Version forensics (from this repo's CHANGELOG.md)

  • 2.1.160: WSL copy-on-select moved from OSC 52 to PowerShell interop
  • 2.1.161: "Fullscreen mode: clipboard now uses wl-copy/xclip/xsel on

Linux when available…" — matches the regression point reported in #67486
("regression from OSC 52 fallback, ~2.1.161")

  • 2.1.181: "Fixed /copy and copy-on-select on Linux not detecting a clipboard

utility installed after Claude Code started" — the stale-detection half of
#67486 is already fixed; this report is only about the remaining half

  • 2.1.222 (current): installed binary contains no literal ]52; escape

sequence, consistent with no OSC 52 fallback existing today; the silent failure
reproduces

Why a new issue (dedup trail — please don't bot-close onto the same chain)

  • #67486 reported exactly this (2.1.170, Ubuntu 24.04) and was auto-closed by the

triage bot as a duplicate of #62350

  • #62350 is a different bug — FleetView /copy inside tmux over VS Code Remote

SSH, an OSC 52 passthrough context — closed as completed on 2026-05-27,
before #67486 was even filed, and now locked

  • The local missing-backend case was therefore never actually triaged, and it

still reproduces on 2.1.222

Suggested fix

Fail loudly with an actionable message — "No clipboard utility found — install
wl-clipboard (Wayland) or xclip/xsel (X11)" — and/or restore an OSC 52 fallback
when no utility is present. Reporting success while the clipboard keeps stale
content is the worst outcome: it sends users off debugging their hardware.

What Should Happen?

Mouse drag-select (fullscreen copy-on-release) — should place the
selected text into the system clipboard. If no clipboard utility is installed,
Claude Code should fail loudly with "No clipboard utility found — install
wl-clipboard (Wayland) or xclip/xsel (X11)". It must never report success
while the clipboard keeps its stale previous content.

Error Messages/Logs

Steps to Reproduce

  1. Ubuntu GNOME Wayland desktop with no clipboard utility installed — stock state

(command -v wl-copy xclip xsel returns nothing)

  1. Put a known marker in the system clipboard (e.g. copy the word "MARKER" from

a text editor)

  1. Run claude in GNOME Terminal; switch renderer with /tui fullscreen
  2. Drag-select any response text with the mouse and release — no error appears,

selection behaves as if copied

  1. Paste (Ctrl+V) into any app

Expected: the selected text.
Actual: "MARKER" — the clipboard still holds its previous content; nothing
anywhere indicates the copy failed.

  1. sudo apt install wl-clipboard, restart Claude Code, repeat steps 2–5:

paste now yields the selected text.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.222

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗