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
Clipboard image paste doesn't work on WSL (Windows Terminal intercepts Ctrl+V) #2
When running OpenCode in WSL via Windows Terminal, pasting images from the clipboard with Ctrl+V doesn't work due to three compounding issues:
Windows Terminal intercepts Ctrl+V at the emulator level before it reaches the app's stdin. When the clipboard contains only an image (no text), WT has nothing to paste and sends zero bytes — no event fires at all.
WSLg clipboard bridge returns BMP format (not PNG/JPEG), which the LLM API rejects with: media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'
wl-paste needs XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir on WSLg to access the Wayland clipboard socket, not the default /run/user/0/.
Steps to Reproduce
Run OpenCode in WSL2 via Windows Terminal
Copy an image to the Windows clipboard (e.g., Win+Shift+S screenshot)
Press Ctrl+V in the OpenCode prompt
Nothing happens
Expected Behavior
The image should be pasted into the prompt as an attachment.
Environment
WSL2 on Windows with WSLg
Windows Terminal (does not implement Kitty keyboard protocol)
Activity