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

(rajveerbachkaniwala.com)

47 points | by rajveerb 2 days ago

13 comments

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

      • benjamincburns 30 minutes ago
        I wasn't alive in the 70s, but I still prefer a terminal.

        I can string together a complex series of text-related tasks far more effectively as a shell pipeline than I can by pointing and clicking in a UI. I can scale that sequence of tasks out to operate on every file on the filesystem if I want, or down to a single character in a single file.

        Claude Code being a full-featured TUI is also helpful because I can quickly/easily use it remotely via SSH without having to deal with setting up X forwarding, VNC, Parsec, etc. The remote host doesn't even need to have a window manager. Sure, it'd be nice if it also had an elegant multi-page GUI so I could more easily drill into the actions its performing and make better use of my large screen to watch it do multi-agent things, but if I have to choose between the two, I prefer the TUI.

        That said, I'd much rather use a GUI to do things that are actually visual/spatial in nature.

        • pjmlp 26 minutes ago
          I can do the same in a language REPL, with the advantage it doesn't need to emulate a teletype.
      • hvb2 39 minutes ago
        Because it's all keyboard based. Depending on your field of work a good UI can be very different.

        A few years ago I watched an account work through my companies numbers using their accounting software. It's entry method? A windows commander like tool. The menu options like add expense etc were all numbered. So he never left the numeric part of his keyboard.

        The tool looked super old and obsolete but as soon as you see a power user use it, you see why.

        • pjmlp 27 minutes ago
          GUIs can also be keyboard based, and there are language REPLs as well.
      • canpan 26 minutes ago
        It might be overcompensation. I think UI, UX and GUIs got better up until the 90s, and early 2000s, but then somewhere GUIs suddenly got a lot worse. So a modern CLI is better and more standardized than a modern GUI.
        • pjmlp 19 minutes ago
          A modern CLI would be a REPL.
      • munk-a 34 minutes ago
        I don't mind a GUI (as long as it isn't an obnoxiously large ribbon or anything) - but if I'm doing work my input device is the keyboard. I don't want to interface with software through moving a mouse pointer when I can just tell it what to do with a few keystrokes.
        • pjmlp 26 minutes ago
          Xerox PARC REPL sytle, and better you can get the inline graphics for free, as there is no need to emulate a teletype.
      • aninteger 52 minutes ago
        And some of us love to live in the 1970s with cheap non-HiDPI monitors (or maybe it's just me).
    • kstenerud 1 hour 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 50 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.

        • kstenerud 32 minutes ago
          I've actually never tried it before. I just ran some tests now on a mac:

          If I copy a file in Finder and paste it into a claude session, it shows in the TUI as [Image #1].

          If I do the same, but paste into a claude session running over SSH, it pastes the path to the file, not the data.

          If I open the image in Preview, copy the pixels (CMD-A, CMD-C), pasting that into a terminal does nothing.

          So it looks like CC just puts UI sugar over top of the image path when it has file access to it? That's not really image pasting, though...

          • benjamincburns 15 minutes ago
            I suspect the first case worked as intended, and VS Code is greasing the wheels. I'm sure there's a way to get it working in iTerm 2, though I wouldn't be surprised if the solution was some Goldbergian chain of forwarded unix sockets and a helper daemon living inside the sandbox.

            Thanks for mentioning yoloAI, though. I started off sandboxing via devcontainers using kata & cloud hypervisor set up as a custom docker runtime. It worked well enough, but nested docker was super slow due to virtio-fs limitations. I recently moved to sysbox and it's a bit quicker. It's probably not as airtight as kata/chv, but good enough to keep Claude from writing a security test that deletes my whole filesystem [1].

            1: https://github.com/anthropics/claude-code/issues/28521

    • patates 1 hour 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 1 hour 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 1 hour 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.
    • DeathArrow 1 hour 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.

      • pjmlp 22 minutes ago
        Which is a pity, a real hacker uses a graphical environment inspired from Lisp Machines, Interlisp-D, Smalltalk, selecting code in the REPL with "do it", fixing it on the fly in the debugger and "redo it", changing the work environment in the flow.

        Unfortunely they hear that and only understand Emacs.

      • ta8903 33 minutes ago
        Would you prefer if those people used a mouse and desktop environments?
    • 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 1 hour ago
      The Unix philosophy is not emotional.
    • bashtoni 1 hour 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.

    • joshka 1 hour ago
      [flagged]
  • thehours 48 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.

  • benjaminl 3 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 2 hours 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 2 hours 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)

  • oezi 42 minutes ago
    Codex CLI is doing this fine. Maybe copy a page from their book.
  • hboon 1 hour ago
    If it's not working, does pasting the absolute path work? Both works on macOS.
    • oezi 43 minutes ago
      Well that means saving the clipboard first.
  • dested 2 hours 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 1 hour ago
    Or just last the path .. ,
  • DeathArrow 1 hour 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 2 hours 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 2 hours ago
    [dead]
  • jadar 3 hours ago
    The last "When this stops being needed" needs one amendment: "Or stop using Windows."
    • pjmlp 20 minutes ago
      Valve could actually create a need for native Windows games.

      As it stands the only reason I have to pain myself back into using Linux on bare metal laptops, instead of VMs, is independence from US technologies in European soil, which also implies not having to care about Claude.

    • stronglikedan 3 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 1 hour 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 3 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 3 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.