[BUG] Image paste (Ctrl+V) silently fails on Wayland: `xclip` is blind to clipboard, `wl-paste` is not used as fallback

Resolved 💬 2 comments Opened May 16, 2026 by rgammino-epower Closed May 18, 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?

On a Wayland session (KDE Plasma 6, Kubuntu 26.04), image paste with Ctrl+V at the Claude Code prompt does nothing — no attachment is added and no error is shown.

Root cause: Claude Code relies on xclip to read the clipboard, but on a pure Wayland session xclip cannot read clipboard contents at all (not even ext written via wl-copy) — KDE/kwin does not bridge clipboard reads to XWayland clients in the way xclip expects. The wl-clipboard tools (wl-paste) read the clipboard correctly but Claude Code does not use them.

This affects every Wayland-only desktop. On Kubuntu 26.04 the Plasma X11 session has been removed (startplasma-x11 and plasma-workspace-x11 are no longer available), so falling back to an X11 session is not an option.

What Should Happen?

Pressing Ctrl+V with an image on the clipboard should attach the image to the prompt, regardless of whether the session is X11 or Wayland. When wl-paste
is available and the session is Wayland (XDG_SESSION_TYPE=wayland or WAYLAND_DISPLAY set), Claude Code should prefer wl-paste over xclip, or use it
as a fallback when xclip returns "target not available".

At a minimum, image paste should surface a clear error/warning when the clipboard read fails, instead of silently doing nothing.

Error Messages/Logs

No error is shown in the UI. `xclip` (which appears to be what Claude Code calls) returns: 
  Error: target image/png not available
but this is not surfaced to the user.

Steps to Reproduce

  1. On a Wayland KDE session (Kubuntu 26.04 / Plasma 6), install both clipboard backends:

sudo apt install wl-clipboard xclip

  1. Copy an image to the clipboard (e.g. Spectacle → "Copy to clipboard").
  2. Verify the clipboard contains the image with wl-paste:

wl-paste --list-types # shows image/png + many others
wl-paste --type image/png | wc -c # returns a non-zero byte count

  1. Verify xclip cannot see it (and cannot see ANY clipboard content, including text):

xclip -selection clipboard -t image/png -o # Error: target image/png not available
echo "test" | wl-copy
xclip -selection clipboard -o # Error: target STRING not available

  1. Start Claude Code (any version that supports image paste) and press Ctrl+V at the prompt.
  2. Observe: nothing happens — no attachment, no error.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.143

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Operating system

Kubuntu 26.04 LTS (Ubuntu 26.04)
Desktop: KDE Plasma 6.6.4
Session: Wayland (XDG_SESSION_TYPE=wayland, WAYLAND_DISPLAY=wayland-0)
Terminal: Konsole
Clipboard tools installed: wl-clipboard (wl-paste, wl-copy) + xclip

View original on GitHub ↗

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