claude-code - 💡(How to fix) Fix Drag-drop and screenshot clipboard paste fail on Linux; works only after re-copy from image viewer

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…
RAW_BUFFERClick to expand / collapse

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.

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