Clipboard Image Parsing Failure on macOS Screenshot Utility

Open 💬 18 comments Opened Jun 15, 2025 by BobbyWang0120

Bug Description
I've encountered a persistent issue where Claude Code fails to read images pasted from the macOS clipboard approximately 90% of the time. The problem occurs consistently when using the native macOS screenshot tool (Cmd+Shift+5 or similar) to copy a selection to the clipboard and then pasting it directly into the Claude interface with Cmd+V.

Steps to Reproduce:

On any macOS device, take a screenshot of a portion of the screen using the system screenshot utility (e.g., Cmd + Shift + 5) and select "Copy to Clipboard".
Navigate to the Claude Code interface.
Press Cmd + V to paste the image.
Expected Result:

Claude should successfully read and display the pasted image, making it available for analysis.

Actual Result:

Claude attempts to read the image but fails, returning an error message indicating the file does not exist. The file path referenced is often a temporary system path.

Error Message Example:

⏺ Read(../../../../../../var/folders/jk/fc9z0l8j3_3b37nfk0gfmxsm0000gn/T/TemporaryItems/image_3.png)
⎿ Error: File does not exist.
This issue significantly hinders the workflow of using visual information for coding assistance. It seems Claude is trying to access a temporary file path that is no longer valid or accessible by the time the read operation is executed.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.24
  • Feedback ID: 31ff54d0-9801-4bd4-afa5-475d5fbcfac9

View original on GitHub ↗

18 Comments

IrumiDesu7 · 1 year ago

any update on this?

speir-wang · 1 year ago

Same thing happens if you do Command + Ctrl + Shift + 4 which will automatically copy the selection area to your clipboard, if we Command + V to paste into the Claude Code CLI, nothing shows up and we will get the same error: File does not exist.

IrumiDesu7 · 1 year ago
Same thing happens if you do Command + Ctrl + Shift + 4 which will automatically copy the selection area to your clipboard, if we Command + V to paste into the Claude Code CLI, nothing shows up and we will get the same error: File does not exist.

well turns out pasting image on macos is with Ctrl + V (yes, with Ctrl on mac)

speir-wang · 1 year ago

@IrumiDesu7 Thanks for sharing mate. I just tested it out and you are right.

When pasting into the Claude Code, it has to be Ctrl + V but if we want to paste the copied image elsewhere, e.g. Slack, it's Command + V, so confusing but it works in this way.

jiangying000 · 11 months ago

on mac

copy image from clipboard works previously, but the function broke as of current version, 1.0.63

speir-wang · 11 months ago
on mac copy image from clipboard works previously, but the function broke as of current version, 1.0.63

@jiangying000 I think they changed it. I am on mac and v1.0.63, Command + V works for me for pasting.

bobbyflowstate · 11 months ago

Still seeing this. This was critical to my flow. Dragging and dropping used to work. Please fix/

mrclrchtr · 11 months ago
well turns out pasting image on macos is with Ctrl + V (yes, with Ctrl on mac)

thank you very much!

Katao123 · 9 months ago

We're experiencing the same issue here.

Reproduction scenario:
When dragging any file into the Claude Code terminal, the previous screenshot content is pasted instead of the file path.

Platform: macOS
Behavior: Consistent reproduction - every time we drag a file after taking a screenshot, the screenshot content gets pasted rather than the file path we're trying to drag.

This confirms the clipboard/drag-and-drop handling issue described in this thread.

namchuai · 9 months ago

Even pasting with Ctrl + V has error:

Unfortunately, the images are still not loading properly on my end - I'm seeing placeholder PNG icons.

  Could you please try one of these alternatives:

  1. Save the screenshots to a specific location (like /tmp/screenshot1.png and /tmp/screenshot2.png) and share the file paths with me so I can read them
  2. Copy and paste the error text directly from Sentry
  3. Describe the issue you're seeing in the screenshots - what's the error message, what endpoint/function is failing, and what's the stack trace?

  This will help me understand what needs to be fixed!

This makes me very frustrated. It was working well before. Previously, I can just screenshot and then drag the preview to the chat... Please bring this back.

matthewadams · 7 months ago

Broken as of now after working flawlessly essentially forever. Using Ctrl-v & iTerm 3.6.6 on Apple Silicon macOS Tahoe 26.1 with @anthropic-ai/claude-code 2.0.50, node 22.15.1, npm 10.9.2.

Also noticed same issue on Linux Mint Cinnamon 22.2/6.4.8/6.14.0-35-generic on AMD64 using terminator 2.1.3 with claude 2.0.47, node 22.20.0, npm 10.9.3. Workaround on Linux Mint was to capture into clipboard with this command: gnome-screenshot -c -a. Tried native Linux Mint screen capture tool & flameshot, neither of which worked.

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

silasg · 6 months ago

I investigated this and found what might be causing it - see #17042 for details.

Running osascript -e 'clipboard info' from within Claude Code fails with:

Connection Invalid error for service com.apple.hiservices-xpcservice

The same command works fine in a regular terminal outside Claude Code.

This suggests the issue may be related to Claude Code's sandbox (SANDBOX_RUNTIME=1 is set, commands are wrapped with sandbox-exec), which could be blocking access to the clipboard XPC service.

kaolin · 5 months ago

still happening :/

nref · 5 months ago

As of 2.1.37, I'm still only able to paste images from the clipboard with Ctrl+V. Tested in in built-in Terminal and WezTerm.

I'd like to use the shortcut native to my OS: cmd+v. Than you.

ParishKhan · 5 months ago
As of 2.1.37, I'm still only able to paste images from the clipboard with Ctrl+V. Tested in in built-in Terminal and WezTerm. I'd like to use the shortcut native to my OS: cmd+v. Than you.

Thanks for letting us know that it works with Ctrl + V. I was trying Cmd + V. I understand it’s still a bug, but at least there’s a workaround.

hqhq1025 · 3 months ago

I built a small open-source tool that fixes this: clipaste

Root cause: macOS screenshots only put raw image data (TIFF/PNG) on the clipboard — no file URL. Terminal emulators like Ghostty and Alacritty can only Cmd+V paste text or file URLs, not raw image data. Additionally, Claude Code's osascript -e 'the clipboard as «class PNGf»' check fails because screenshots don't always include the legacy PNGf type.

How clipaste fixes it: It's a lightweight macOS background daemon (~18 MB RAM, 0% CPU idle) that watches the clipboard. When it detects a screenshot (image data without a file URL), it:

  1. Saves the image as a temp PNG file
  2. Registers the file path via NSPasteboard.writeObjects([url as NSURL]) (so Cmd+V pastes the path)
  3. Adds the legacy PNGf pasteboard type (so Ctrl+V / osascript image paste works too)
brew install hqhq1025/clipaste/clipaste
brew services start clipaste

Tested with Ghostty 1.3.1, iTerm2, Terminal.app + Claude Code. Both Cmd+V and Ctrl+V work after installing.

eworthing · 1 month ago

I looked up this issue because of the tips I kept seeing to use ctrl+v instead of cmd+v despite never having an issue with pasting in images. I now realize it's most likely the screenshot utility I use, CleanShot X, that is bypassing this issue. Just an FYI for those who are looking for another way to fix this issue.