logoalt Hacker News

Why Ctrl+V won't paste images in Claude Code on WSL, with a fix

48 pointsby rajveerblast Monday at 2:41 PM54 commentsview on HN

Comments

mdrzntoday at 7:10 AM

My main issue was the ability to paste images when using ClaudeCode via ssh on a remote machine, so I solved it by having Claude write a quick bridge that fetches the image in your clipboard, rsync it to the server and paste the correct image path in your clipboard: https://github.com/mdrzn/claude-screenshot-uploader

albert_etoday at 4:21 AM

Why are we emotionally tied to command line interfaces

Desktop apps are a second class citizen that do not get feature parity

Lot of actions on Claude Code seem much more suited for a thoughtfully designed GUI

Even the chat responses and links therein can benefit from judicious use of rich text and formatting and real hyperlinks to other parts of the UI or elsewhere

Favourite Skills can be toolbar buttons or menus if user so wishes.

show 11 replies
benjaminltoday at 3:14 AM

Ctrl+V paste works for me on WSL. My secret is that I have given up on WSLg and use a standalone X Windows server. Specifically, the X410 X Server. This removes a whole lot of weird behavior including the ones described by the article.

show 2 replies
thehourstoday at 5:35 AM

Only tangentially related, but does anyone know if it is possible to ‘paste’ images to an agent harness running inside a docker container?

My current workaround is to paste it inside the working directory on the host machine, then @ reference it, but would be nice to streamline that workflow.

destedtoday at 4:05 AM

Unrelated but I have a similar problem with speech to text apps on windows, where due to the funkiness of claude codes (necessary) implementation, it doesn't send the keybindings correctly.

I sure wish it didn't have to be a console app

oezitoday at 5:41 AM

Codex CLI is doing this fine. Maybe copy a page from their book.

hboontoday at 5:20 AM

If it's not working, does pasting the absolute path work? Both works on macOS.

show 1 reply
bombcartoday at 3:38 AM

I have the opposite problem; pasting anything moderately substantial into VSClaude ends up sending an image.

AgentMasterRacetoday at 4:45 AM

Or just last the path .. ,

DeathArrowtoday at 5:05 AM

This is still better than trying to paste text, files or images in Linux. In latest Pop!_OS I have to keep the app I copy from open until I paste. To add insult to the injury, pasting in terminal produces weird characters.

behnamohtoday at 4:14 AM

It doesn't work for me on macOS + ghostty either. IDK what's the cause.

show 2 replies
rajveerblast Monday at 2:41 PM

tl;dr Use Claude Code in WSL inside Windows Terminal? Copying an image in Windows and pressing Ctrl+V in Claude Code doesn't work. Three things break: (1) WSL only hands Windows images to the Linux side in an old BMP format Claude Code can't read; (2) WSL also keeps quietly overwriting your fixes a moment later; (3) Windows Terminal grabs Ctrl+V before Claude Code can see it. The fix is a small Windows program that converts the image to PNG, a Linux script that puts it on the Linux clipboard (and re-asserts once after WSL overwrites it), and one extra keybinding for Claude Code so the keystroke actually reaches the program.

Code: https://github.com/rajveerb/wsl-clip-bridge

jkwangtoday at 7:11 AM

[flagged]

jocelynertoday at 4:05 AM

[dead]

jadartoday at 2:43 AM

The last "When this stops being needed" needs one amendment: "Or stop using Windows."

show 3 replies