Support pasting files/folders from clipboard as paths, and screenshots from macOS clipboard
Problem
When copying a file to the macOS clipboard (via Finder Cmd+C or programmatically via NSPasteboard), pasting into Claude Code does nothing unless the file is an image. Similarly, macOS screenshots saved to clipboard ("Save to clipboard" option) cannot be pasted into Claude Code.
Other terminal apps (iTerm2) handle these clipboard content types correctly — pasting a copied file inserts its absolute path, and pasting a screenshot inserts the image.
Expected behavior
- Files/folders copied to clipboard: Pasting should insert the absolute file path(s) as text into the chat input. This would allow quick referencing of files without manually typing paths.
- Code/markdown files: Same as above — paste should insert the absolute path so Claude Code can then read the file.
- Folders: Pasting a copied folder should insert the absolute folder path.
- macOS screenshots saved to clipboard: The "Save to clipboard" option in macOS screenshot tool (Cmd+Shift+4 → click "Save to clipboard" in the preview) should be pasteable into Claude Code as an image, same as pasting image files.
Context
The macOS clipboard stores multiple representations simultaneously via NSPasteboard:
NSFilenamesPboardType/public.file-url— file referencespublic.utf8-plain-text— text pathpublic.png/public.tiff— image data (for screenshots)
It seems Claude Code currently only handles some of these content types. Supporting all of them would significantly speed up workflows where users want to reference files or share screenshots.
Reproduction
- Copy any non-image file in Finder (Cmd+C)
- Try to paste (Cmd+V) into Claude Code chat
- Nothing happens
For screenshots:
- Take a screenshot with Cmd+Shift+4
- Click "Save to clipboard" in the floating preview
- Try to paste into Claude Code
- Nothing happens
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗