You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pasting an image file copied in Finder attaches the file name or its icon instead of the image (macOS) #54844
On macOS, copying an image file in Finder (Cmd+C) and pasting it into the TUI doesn't attach the image:
Cmd+V in terminals like VS Code's inserts only the file name (Screenshot … AM.png). Finder puts just the bare name on the pasteboard as text, and it doesn't resolve relative to the cwd.
Ctrl+V (prompt.paste) attaches Finder's generic 1024×1024 file icon, because OpenTUI reads the public.png flavor, which is the icon.
The real path is on the pasteboard as a file URL (public.file-url), but nothing reads it. Previously reported in #4004 and #7897 (both closed), and attempted in #6127 (auto-closed while stale).
OpenCode version
v2.0.25
Steps to reproduce
Select an image in Finder, press Cmd+C
Paste into the opencode prompt with Cmd+V or Ctrl+V
You get the file name as text, or the Finder icon, instead of the image
Thanks for the detailed report, @lacherogwu. I couldn't reproduce this here because it needs macOS: the bug depends on what Finder puts on the macOS pasteboard when you copy a file, and the test environment runs Linux.
The current dev code matches what you describe. prompt.paste asks the clipboard for image/png and then text/plain, and never asks for a file URL (public.file-url). So with a Finder file copy it can pick up the PNG icon, and Cmd+V through the terminal only gets the file name. A maintainer on macOS will need to confirm it.
Activity
opencode-agent commentedon Oct 12, 2026
Thanks for the detailed report, @lacherogwu. I couldn't reproduce this here because it needs macOS: the bug depends on what Finder puts on the macOS pasteboard when you copy a file, and the test environment runs Linux.
The current
devcode matches what you describe.prompt.pasteasks the clipboard forimage/pngand thentext/plain, and never asks for a file URL (public.file-url). So with a Finder file copy it can pick up the PNG icon, and Cmd+V through the terminal only gets the file name. A maintainer on macOS will need to confirm it.Related issues: