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

(rajveerbachkaniwala.com)

42 points | by rajveerb 2 days ago

12 comments

  • thehours 6 minutes ago
    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.

  • albert_e 1 hour ago
    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.

    • pjmlp 44 minutes ago
      I really don't get it.

      Started using computers when that was the only affordable way to use computers.

      For some reason, some people really love to live in 1970's with their expensive HiDPI monitors.

      • aninteger 10 minutes ago
        And some of us love to live in the 1970s with cheap non-HiDPI monitors (or maybe it's just me).
    • kstenerud 26 minutes ago
      I do love GUIs, and use them for most of my workflow. But for Claude, I definitely prefer the CLI.

      Since it's a CLI app, I can wrap it in yoloAI for the sandbox protection, and also use VS Code's tunneling feature to reach that sandboxed workdir (with permissions safely bypassed) through my GUI.

      https://freeimage.host/i/screenshot-2026-05-19-at-141349.ByS...

      • benjamincburns 8 minutes ago
        But can you paste an image into it?

        I have a similar setup, but I access it directly via iTerm2 instead of VS Code's terminal. I've figured out the right terminal settings to get copying/pasting text to work (including with neovim's + register), but not images. Would be nice to paste images, though. Currently I have to SCP them over.

    • patates 38 minutes ago
      Composability (piping to other programs, or calling them via scripts), reachability (through ssh, for example), focus (not being distracted by all options being present) and universality (cli is more or less the same interface everywhere) are my reasons.

      I still use GUI apps too, and actually find claude code to be closer to a GUI app than a cli.

    • hombre_fatal 54 minutes ago
      Why did you lambast it as an emotional attachment instead of a practical preference?

      People prefer terminal apps because they run inside our terminal app environments (kitty, zellij, tmux), tend to be keyboard driven, tend to be more lightweight than GUIs, tend to be scriptable, and can be run remotely over a standard ssh session.

      A conventional GUI is a nonstarter in comparison.

    • oneneptune 18 minutes ago
      idk I just like running 6/8 terminal panes and organizing my workflows / projects in an exact space. I even tweaked my theme. and seeing them all on my side portrait monitor.
    • mmh0000 1 hour ago
      Use Claude Desktop? (https://claude.com/download)

      Personally, I much prefer the CLI. The CLI is a tool that has been refined for over 50 years to excel at text input and output. Once you learn it, it can feel like an extension of your brain.

    • samlinnfer 37 minutes ago
      The Unix philosophy is not emotional.
    • bashtoni 38 minutes ago
      A text based interface is perfect for interacting with a large language model, and it seems unsurprising to me that it's the most popular way to work with them.

      Frankly, the idea of having to decipher what a picture is supposed to represent to use a skill fills me with horror.

    • DeathArrow 27 minutes ago
      >Why are we emotionally tied to command line interfaces

      Being a power user, having used computers for more than 30 years, I usually prefer GUI because that's an evolution over CLI.

      Going from the basic interpreter on ZX Spectrum to the command line in MS DOS had me mesmerized. Going from the DOS CLI to Windows 95 GUI, had me me mesmerized, too.

      I think people in general consider themselves more pro and "hackers" if they use CLI and editors like Vi and Emacs.

      There are bonus points for memorizing hundreds of different keyboard shortcuts and not using the mouse at all.

      If they absolutely have to use GUI, they not use a desktop environment in Linux but a stacking window manager.

    • joshka 32 minutes ago
      [flagged]
  • benjaminl 2 hours ago
    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.
    • cheema33 1 hour ago
      I have not tried this mostly because I figured it would a resource hog and clunky. Are you describe your experience with X410 on WSL in some more detail? What are the downsides?
    • sterlind 1 hour ago
      you do you, but I've had only good luck with WSLg. my main gripe with it is that it could be doing more. internally (part of?) WSLg uses the RDP protocol, which natively supports audio forwarding, USB passthru and smart cards. yet none of it's wired up.

      (disclaimer: I work at MS, not on WSL)

  • hboon 21 minutes ago
    If it's not working, does pasting the absolute path work? Both works on macOS.
    • oezi 1 minute ago
      Well that means saving the clipboard first.
  • dested 1 hour ago
    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

  • bombcar 2 hours ago
    I have the opposite problem; pasting anything moderately substantial into VSClaude ends up sending an image.
  • AgentMasterRace 56 minutes ago
    Or just last the path .. ,
  • DeathArrow 36 minutes ago
    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.
  • behnamoh 1 hour ago
    It doesn't work for me on macOS + ghostty either. IDK what's the cause.
  • rajveerb 2 days ago
    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

  • jocelyner 1 hour ago
    [dead]
  • jadar 2 hours ago
    The last "When this stops being needed" needs one amendment: "Or stop using Windows."
    • stronglikedan 2 hours ago
      > Or stop using Windows

      I'd rather continue to be as productive as possible.

      • z3c0 2 hours ago
        Not even getting into the semantics of what one could mean by "productive", that sounds like a bleak existence.
        • thewebguyd 35 minutes ago
          Not everyone here is *nix-pilled (WSL aside). Despite W11's missteps, Windows isn't a completely terrible OS to work on and has some of the best window management outside of a full tiling WM.
    • TZubiri 2 hours ago
      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.

      • fragmede 2 hours ago
        Sixel came out in the 80's as a way to print on dot matrix printers. If your terminal doesn't support that yet, you might want to look into updating your software.
      • TurdF3rguson 2 hours ago
        So basically don't use Claude Code is your suggestion. Not very helpful, guy.
        • recursive 1 hour ago
          I think you've misunderstood, guy.
        • TZubiri 2 hours ago
          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.
          • TurdF3rguson 1 hour ago
            The image in my clipboard doesn't have an url.