22 comments

[ 2.8 ms ] story [ 42.0 ms ] thread
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

The last "When this stops being needed" needs one amendment: "Or stop using Windows."
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.
the post has a much simpler fix.
I have the opposite problem; pasting anything moderately substantial into VSClaude ends up sending an image.
I have loads of terminal sessions in different workspaces open so I moved to using terminals as much as possible.
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

It doesn't work for me on macOS + ghostty either. IDK what's the cause.
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.

The reason for the CLI is because most editors will support CLIs natively, so its very easy to pop in Claude Code either via your IDE or your preferred terminal in your project directory. It's lowkey the most genius design choice by Anthropic. Why they havent made a real GUI since? No idea.
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.
If it's not working, does pasting the absolute path work? Both works on macOS.
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.

Codex CLI is doing this fine. Maybe copy a page from their book.
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
This is awesome! Thank you rajveerb. Here is to hoping issues from 2022 will be fixed ;-)
glad that you found it useful that was the intent.
Why would anyone assume that pasting an image into a CLI interface would work? The fact that this is framed as a bug is wild to me (but very cool that there is a way to do it now)