Unable to paste images into Claude Code TUI interface

Status Fixed / completed
Maintainer reply ✓ Yes — igorkofman
Activity 32 comments · opened Apr 21, 2025 · closed Aug 1, 2025
💡 Likely answer: A maintainer (igorkofman, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Claude CLI version: 0.2.74
  • Operating System: Ubuntu 22.04
  • Terminal: gnome-terminal xterm-256color

Bug Description

<!-- A clear and concise description of the bug -->

Steps to Reproduce

  1. run claude code
  2. attempt to paste images via ctrl-v
  3. nothing happens

Expected Behavior

https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#work-with-images
Docs seem to imply that ctrl-v should allow pasting of images

View original on GitHub ↗

32 Comments

lockmeister · 1 year ago

I can drag and drop images in, which inserts the image file path in single quotes.
But Claude code does not seem to actually see the image, when I ask questions about the image via prompts, the answers are off.

Stewart86 · 1 year ago

using kitty, feel like it could be a terminal specific issue. Was not able to paste the image too but dragging the image from a UI file explorer works. maybe if will be better if we can have a command to retrieve from system clipboard?

igorkofman collaborator · 1 year ago

We just shipped some fixes and improvements to this.
Dragging should work now in a broader set of cases.
cmd-v on mac should work for pasting image files
ctrl-v on mac should work for pasting images (like screenshots) which aren't files.

Will do some testing on Ubuntu!

Stewart86 · 1 year ago

I have just tested with Arch Linux running wayland on Kitty terminal. can confirm that it is still not working. Clipboard on Linux can be challenging.

jly-x · 1 year ago

This also happens on the Warp terminal on macOS. Pasted images result in a 400 error invalid formatting.
When I use the same claude installation on my stock mac terminal, it works fine.

SamDc73 · 1 year ago

Still not working on Arch Linux (kitty Terminal)

maksimu · 1 year ago

Not working for me. I'm on Mac M1 + Iterm + zsh + Claude Code 1.0.2
Drag and drop works fine (pasts the path)

kkrishnan90 · 1 year ago

Im on M4 Mac with the native OS terminal. Doesn't work with cmd+v specifically for those images and screenshots you capture and have them on your clipboard. I use the Maccy clipboard to hold my clipboard histories. Any ETA on the fix ?

SamDc73 · 1 year ago

I found a work an around on my Linux machine using Kitty terminal on Wayland !

1) first install Kitty terminal and wl-clipboard.
2) first create this script clip2path and place in ~/.local/bin

#!/usr/bin/env bash
set -e

types=$(wl-paste --list-types)

if grep -q '^text/' <<<"$types"; then
    wl-paste --no-newline | kitty @ send-text --stdin             
elif grep -q '^image/' <<<"$types"; then
    ext=$(grep -m1 '^image/' <<<"$types" | cut -d/ -f2 | cut -d';' -f1)
    file="/tmp/clip_$(date +%s).${ext}"
    wl-paste > "$file"
    printf '%q' "$file" | kitty @ send-text --stdin             
else
    wl-paste --no-newline | kitty @ send-text --stdin
fi

then run chmod a+x ~/.local/bin/clip2path

3) inside in kitty config file ~/.config/kitty/kitty.conf add this :

allow_remote_control yes

map ctrl+v launch --type=background --allow-remote-control --keep-focus ~/.local/bin/clip2path

And restart the terminal !

----

Expected behavior :

When you hit Ctrl+v in the terminal it will paste text, if it's a copied file it pastes the path in the terminal, if it's a screenshot it will save it to a temp path and paste that path !

On Xorg you should be able to do the same with a bit of modifications.
Tested on Arch Linux KDE Wayland !

Stewart86 · 1 year ago
I found a work an around on my Linux machine using Kitty terminal on Wayland ! 1. first install Kitty terminal and wl-clipboard. 2. first create this script clip2path and place in ~/.local/bin `` #!/usr/bin/env bash set -e types=$(wl-paste --list-types) if grep -q '^text/' <<<"$types"; then wl-paste --no-newline | kitty @ send-text --stdin elif grep -q '^image/' <<<"$types"; then ext=$(grep -m1 '^image/' <<<"$types" | cut -d/ -f2 | cut -d';' -f1) file="/tmp/clip_$(date +%s).${ext}" wl-paste > "$file" printf '%q' "$file" | kitty @ send-text --stdin else wl-paste --no-newline | kitty @ send-text --stdin fi ` then run chmod a+x ~/.local/bin/clip2path 3. inside in kitty config file ~/.config/kitty/kitty.conf add this : ` allow_remote_control yes map ctrl+v launch --type=background --allow-remote-control --keep-focus ~/.local/bin/clip2path `` And restart the terminal ! Expected behavior : When you hit Ctrl+v in the terminal it will paste text, if it's a copied file it pastes the path in the terminal, if it's a screenshot it will save it to a temp path and paste that path ! On Xorg you should be able to do the same with a bit of modifications. Tested on Arch Linux KDE Wayland !

You are a genius! This workaround works! running kitty on Arch

Noitidart · 1 year ago

For macs, I made an app, which introduces a hotkey Cmd + Option + 4 which save the screenshot temporarily to disk (deleted within ~1h) and copies the file path to your clipboard/Users/my-user-name/Documents/Claude Shots/2025-05-31T11.07.35.png and so can directly paste to terminal. It's the workaround I found for now.

!Image

ashrodan · 1 year ago

@Noitidart feel free to share the solution as that sounds like a good workaround

kkrishnan90 · 1 year ago

Well I figured out. It's buried deep in the documentation or I don't remember exactly where I read (may be in the best practice guide). You copy from the clipboard (grab the screenshot cmd+shift+4) and use ctrl+v (NOT cmd+v) on Mac and it works now. I use Maccy as my clipboard manager

Noitidart · 1 year ago

Oh wow tank you @kkrishnan90 that worked! I use native macos cmd+shift+ctrl+4 and no special clipboard manager, just macos. Ctrl+V worked.

CC: @ashrodan

ziv770 · 1 year ago

What about windows + wls?

oxillix · 1 year ago

windows + WSL is indeed an issue, cntrl+v doesnt work in my bash terminal on wsl2

shobhi1310 · 1 year ago

Yupp agreed windows + WSL is an issue for screenshot at this point

alessionobile · 1 year ago

Linux Kubuntu 25.04 on Konsole.

Clipboard pasting not working either.
It works if I copy the location of a file from a directory (through Dolphin) and paste into Claude Code TUI.

isCopyman · 1 year ago

when using ssh and vscode, it not works.

ZerkerEOD · 1 year ago

I can't paste images when I am using Hyprland/Hyprshot that copies it to the clipboard. But on KDE, I am able to use specatcle copy to clipboard and paste into VSCode.

neondeex · 1 year ago

Same problem vscode hyprland wayland

thecodecentral · 1 year ago

For Linux, try this https://github.com/thecodecentral/gshot-copy. It requires X11. I haven't tested it in Wayland. Maybe someone can create a PR for Wayland.

rsteenwyk · 1 year ago

I haven't figured out how to get ctrl+C / ctrl+V to work, but I did finally figure out a more reasonable way of getting screenshots to Claude Code using Windows Terminal and WSL.

In Windows Terminal settings, go to the profile where you use Claude Code (Ubuntu for me), and under Additional Settings click on "Advanced" then set "Path Translation" to "WSL".

With that done, I can now drag and drop an image from Windows Explorer into Claude code.

<img width="1480" alt="Image" src="https://github.com/user-attachments/assets/9453b0a9-09a4-4037-a8bc-4b35977464c0" />

nishantsah08 · 1 year ago

cntr+v not working in claude code. I am using windows and vs code and tunneling ubuntu
1.0.43 (Claude Code)
Ubuntu 24.04.2 LTS
VS code
Version: 1.101.2 (user setup)
Commit: 2901c5ac6db8a986a5666c3af51ff804d05af0d4
Date: 2025-06-24T20:27:15.391Z
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Windows_NT x64 10.0.19045

shukebeta · 1 year ago

for X11 users who use kitty terminal, this tutorial can help you out. https://blog.shukebeta.com/2025/07/11/quick-fix-claude-code-image-paste-in-linux-terminal/

Many thanks to @SamDc73 as it is basically his idea!

Stewart86 · 1 year ago
for X11 users who use kitty terminal, this tutorial can help you out. https://blog.shukebeta.com/2025/07/11/quick-fix-claude-code-image-paste-in-linux-terminal/ Many thanks to @Stewart86 as it is basically his idea!

Not mine. You tagged / credited the wrong person. 🫣

jiangying000 · 1 year ago

copy image from clipboard works previously on mac, but break at least in version 1.0.63

al3rez · 1 year ago

tmux + foot (or any other teminal) soluton:

shotout to @Stewart86

bind -n C-v run-shell -b "clip2path | tmux load-buffer -; tmux paste-buffer"
AktivDevOps · 1 year ago

I'm running into the same issue. On windows, I cannot use the crtl+v to paste images. It does however work on my mac.

richin13 · 1 year ago

I had the same issue in Ubuntu/Pop OS (running Ghostty and Tmux). Installing xclip fixed the issue 👍🏼

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.