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
[Bug]: Linux clipboard paste misidentifies text as image #23458
On Linux, pasting text containing Unicode characters via Ctrl+V incorrectly identifies the content as an image and fails with "could not process image". Root cause: In clipboard.ts (lines 93-104), xclip -selection clipboard -t image/png -o outputs raw bytes even when clipboard contains text (not an image). The code only checks byteLength > 0, so text gets labeled as image/png and sent to the model, which fails to decode it. Fix: Use the existing sniffAttachmentMime() function from media.ts to validate PNG magic bytes before returning as image.
Plugins
none
OpenCode version
1.14.18
Steps to reproduce
echo '¯\_(ツ)_/¯' | xclip -selection c
Ctrl+V in OpenCode TUI
Error: "could not process image"
Ctrl+Shift+V works fine.
Activity
fix(opencode): validate clipboard content type on Linux
fix(opencode): validate clipboard content type on Linux
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.