Drag-drop and screenshot clipboard paste fail on Linux; works only after re-copy from image viewer

Resolved 💬 2 comments Opened May 26, 2026 by buddyitsheaven Closed May 29, 2026

Environment

  • Claude Code: 2.1.150
  • OS: Arch Linux (kernel 6.18.3-arch1-1)
  • TERM: xterm-256color
  • Shell: bash

Bug 1: Drag-drop image fails

Dragging an image file from the file manager into the Claude Code prompt does nothing. The same drag works in Codex CLI in the same terminal — the issue is Claude-specific.

Bug 2: Screenshot clipboard paste fails

Taking a screenshot (to clipboard) and then pasting (Ctrl+V) into the Claude Code prompt does nothing. But opening the same image in an image viewer, copying from the viewer, and then pasting — works.

Hypothesis

Claude Code likely reads text/uri-list MIME from the clipboard but skips raw image/png data. Screenshot tools write only image/png; image viewers write both image/png and text/uri-list (pointing to a temp file) — so the viewer path succeeds.

Repro

  1. Take a screenshot to clipboard (gnome-screenshot / flameshot / spectacle)
  2. Paste into Claude Code prompt → nothing happens
  3. Open the saved image in a viewer, Ctrl+C, paste into Claude Code → image attached

Expected

Raw image/png clipboard content should attach, matching Codex CLI behavior. Drag-drop from file managers should also attach the image.

View original on GitHub ↗

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