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
macOS: image paste fails for Figma "Copy as PNG" clipboard contents #44740
I tried to copy a design from Figma as PNG so I could paste in opencode and have the agent read the design.
Copying and pasting from other sites works fine, from Figma (specifically Desktop) is where pressint CMD+V or CTRL+V did nothing.
The agent generated the following notes to explain the issue, as it was able to fix it via some commands:
read() in packages/tui/src/clipboard.ts uses osascript -e 'set imageData to the clipboard as "PNGf"'. That coercion fails with -1700 ("Can't make some data into the expected type") when the clipboard comes from Figma's ⇧⌘C copy — even though a valid public.png is present.
Figma writes a type cocktail (org.w3.web-custom-format.*, public.png, Apple PNG pasteboard type, org.chromium.source-url, public.tiff) that breaks the AppleScript coercion. Rewriting the clipboard as plain PNG via NSPasteboard fixes pasting.
Suggested fix: on macOS read public.png directly (Swift helper or JXA ObjC bridge) instead of AppleScript coercion.
Plugins
No response
OpenCode version
1.18.8
Steps to reproduce
Figma (web or desktop): select frame → ⇧⌘C (Copy as PNG)
Paste into opencode TUI → nothing attaches
osascript -e 'the clipboard as "PNGf"' → error -1700, while NSPasteboard.data(forType: .png) returns the PNG fine (verified via Swift)
If your issue is specifically about Figma's multi-type clipboard format breaking the osascript coercion (which yours appears to be), it may be a distinct root cause worth tracking separately, but please check the above issues to see if a fix there would also address your case.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Aug 24, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is specifically about Figma's multi-type clipboard format breaking the osascript coercion (which yours appears to be), it may be a distinct root cause worth tracking separately, but please check the above issues to see if a fix there would also address your case.
disarticulate commentedon Sep 12, 2026
copy paste doesnt work anywhere because who ever decided to override normal terminal behavior fails to read issues.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊