claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Clipboard Image Parsing Failure on macOS Screenshot Utility

Open BobbyWang0120 opened this issue 7 months ago • 12 comments

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

BobbyWang0120 avatar Jun 15 '25 05:06 BobbyWang0120

any update on this?

IrumiDesu7 avatar Jun 15 '25 12:06 IrumiDesu7

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.

speir-wang avatar Jun 25 '25 13:06 speir-wang

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)

IrumiDesu7 avatar Jun 25 '25 15:06 IrumiDesu7

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

speir-wang avatar Jun 26 '25 00:06 speir-wang

on mac

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

jiangying000 avatar Jul 30 '25 11:07 jiangying000

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.

speir-wang avatar Jul 31 '25 00:07 speir-wang

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

bobbyflowstate avatar Aug 20 '25 11:08 bobbyflowstate

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

thank you very much!

mrclrchtr avatar Aug 20 '25 19:08 mrclrchtr

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.

Katao123 avatar Oct 11 '25 08:10 Katao123

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.

namchuai avatar Oct 13 '25 13:10 namchuai

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.

matthewadams avatar Nov 23 '25 13:11 matthewadams