Live data from Hacker News

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

rajveerbachkaniwala.com

1–10 of 95 posts

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

#2
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

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

#4
post #3

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

Not a bug, pasting images into the terminal is not supported, do not do this, that's not what the terminal is for or how it is used. The standard way is to pass the path of a file to the program as a runtime parameter or in some config file.

Terminals are not alternative web browsers/graphical application sandboxes.

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

#7
post #4
post #3

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

Not a bug, pasting images into the terminal is not supported, do not do this, that's not what the terminal is for or how it is used. The standard way is to pass the path of a file to the program as a runtime parameter or in some config file. Terminals are not alternative web browsers/graphical application sandboxes.

So basically don't use Claude Code is your suggestion. Not very helpful, guy.

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

#8
post #3

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

> Or stop using Windows I'd rather continue to be as productive as possible.

Not even getting into the semantics of what one could mean by "productive", that sounds like a bleak existence.

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

#10
post #4

Earlier quoted context omitted.

Not a bug, pasting images into the terminal is not supported, do not do this, that's not what the terminal is for or how it is used. The standard way is to pass the path of a file to the program as a runtime parameter or in some config file. Terminals are not alternative web browsers/graphical application sandboxes.

So basically don't use Claude Code is your suggestion. Not very helpful, guy.

pass the url (local or otherwise) of the image to Claude code. Otherwise it's not the terminal's problem, please don't pressure Microsoft to introduce an attack vector to wsl for slop's sake.
Post reply on HN