Dragging an image attaches the macOS file-type icon instead of the file (silently)
What happened
Dragging an image into the prompt silently attaches the macOS generic file-type icon instead of the file's contents. The assistant then receives a 1024x1024 picture of a grey "PNG" document icon and, unless it happens to notice, analyses that instead of the intended screenshot.
The attachment that landed in the session image cache:
1.png 114 KB 1474 x 1050 <- earlier drag, correct
3.png 68 KB 1024 x 1024 <- generic PNG document icon, not the file
1024x1024 at ~68 KB is exactly the macOS document icon for a .png file, so the drag delivered the icon representation (or an unresolved file promise) rather than the file.
What I expected
Either resolve the dragged file and attach its contents, or reject the drop with a visible message such as "could not read the dropped file". The silent substitution is the real problem: nothing in the UI or in the model's input indicates that the attachment is a placeholder, so the model answers confidently about the wrong image. In my case the user asked me to compare a screenshot against an earlier one, and only the unusual dimensions gave it away.
Steps to reproduce
Not 100% deterministic; it depends on the drag source.
- Take a screenshot on an iPhone, let it sync to Photos on the Mac.
- Drag the image from the Photos app (or from a "Recents" list) into the Claude Code prompt.
- Ask the model to describe the image.
Reliable workarounds:
- Paste the absolute path as plain text (
/Users/me/Desktop/IMG_1234.PNG) — works every time. - Save the file to disk first and drag it from Finder — earlier drags from Finder came through correctly in the same session.
So the failure seems tied to sources that hand over a promise/icon (Photos, Recents, temporary items) rather than a resolvable file URL.
Suggested fix
- Resolve
NSFilePromiseReceiver/ read the pasteboard's file URL before falling back to any image representation. - If only an icon representation is available, drop it and surface an error instead of attaching it.
- A cheap guard that would also help: refuse an attachment that is exactly the generic document icon, or warn when a dropped image is a square icon-sized bitmap.
Environment
- Claude Code 2.1.226
- macOS 26.5 (Darwin 25.5.0), Apple silicon
- Terminal drag-and-drop into the interactive prompt
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗