Unable to paste images into Claude Code TUI interface
Environment
- Claude CLI version: 0.2.74
- Operating System: Ubuntu 22.04
- Terminal: gnome-terminal xterm-256color
Bug Description
Steps to Reproduce
- run claude code
- attempt to paste images via ctrl-v
- 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
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.
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?
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!
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.
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.
Still not working on Arch Linux (kitty Terminal)
Not working for me. I'm on Mac M1 + Iterm + zsh + Claude Code 1.0.2
Drag and drop works fine (pasts the path)
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 ?
I found a work an around on my Linux machine using Kitty terminal on Wayland !
- first install Kitty terminal and wl-clipboard.
- first create this script
clip2pathand 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
- inside in kitty config file
~/.config/kitty/kitty.confadd 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 !
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 fithen run
chmod a+x ~/.local/bin/clip2path3. 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/clip2pathAnd 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
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.
@Noitidart feel free to share the solution as that sounds like a good workaround
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
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
What about windows + wls?
windows + WSL is indeed an issue, cntrl+v doesnt work in my bash terminal on wsl2
Yupp agreed windows + WSL is an issue for screenshot at this point
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.
when using ssh and vscode, it not works.
https://docs.anthropic.com/en/docs/claude-code/common-workflows#work-with-images:~:text=Copy%20an%20image%20and%20paste%20it%20into%20the%20CLI%20with%20ctrl%2Bv%20(Do%20not%20use%20cmd%2Bv) Pasting images doesn't work in a VSCode terminal on 1.0.34 (Claude Code)
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.
Same problem vscode hyprland wayland
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.
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.
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
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!
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. 🫣
copy image from clipboard works previously on mac, but break at least in version 1.0.63
tmux + foot (or any other teminal) soluton:
shotout to @Stewart86
bind -n C-v run-shell -b "clip2path | tmux load-buffer -; tmux paste-buffer"
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.