logoalt Hacker News

kstenerudtoday at 5:51 AM1 replyview on HN

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...


Replies

benjamincburnstoday at 6:08 AM

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

show 1 reply