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
On WSL2 Debian, the OpenCode TUI (v2.1.2) silently ignores an image pasted from the Windows clipboard. The same workflow worked in OpenCode 1.3.x, and text paste still works. Claude in the same environment still handles image paste (user-reported), so this looks like an OpenCode TUI regression rather than a missing clipboard image.
Environment
opencode version: 2.1.2
OS: Linux 5.15.167.4-microsoft-standard-WSL2 (WSL2, Debian)
So the image is present on the Windows clipboard; OpenCode's TUI paste path is the failing part.
Expected Behavior
The pasted image is attached to the prompt and becomes visible to the model, as it did in OpenCode 1.3.x and as it does in Claude in the same environment.
Actual Behavior
Nothing happens: no image attachment, no [image ...] marker, no error or notification. The prompt only receives text paste events.
Additional Context
Reproducible consistently (100%) in this environment.
wl-clipboard is installed (/usr/bin/wl-paste), but the WSLg Wayland socket is under /mnt/wslg/runtime-dir; direct wl-paste calls fail with XDG_RUNTIME_DIR is invalid or not set / Failed to connect to a Wayland server, so this may be a separate WSLg environment issue. It is not the only factor: the regression is between OpenCode 1.3.x and 2.1.2, and Claude handles the same clipboard.
Workaround used: a local snap script reads the Windows clipboard via PowerShell and writes /tmp/opencode/screenshot.png; then @/tmp/opencode/screenshot.png attaches it manually. This is not a fix, just a workaround.
Workarounds tried: text paste (works), Ctrl+V / Ctrl+Shift+V (both fail silently), PowerShell clipboard read (works), same clipboard in Claude (works).
Thanks for the detailed report! I think this is a duplicate of #49895, which reports the same silent failure when pasting an image on WSL2 with OpenCode v2.
Possible duplicates and related issues, ordered from most to least likely:
Until the fix lands, two workarounds from the #49895 thread may help in your setup:
Your XDG_RUNTIME_DIR/wl-paste errors match one commenter's case. Pointing at the WSLg socket fixed it for them: run export WAYLAND_DISPLAY=/mnt/wslg/runtime-dir/wayland-0 before starting opencode.
Another user on the same WSL kernel (5.15.167.4) fixed it by updating WSL to 3.0.3.0 (wsl --update).
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Activity
opencode-agent commentedon Oct 21, 2026
Thanks for the detailed report! I think this is a duplicate of #49895, which reports the same silent failure when pasting an image on WSL2 with OpenCode v2.
Possible duplicates and related issues, ordered from most to least likely:
powershell.exeon WSL, as 1.x did, and show an error instead of failing silently.Until the fix lands, two workarounds from the #49895 thread may help in your setup:
XDG_RUNTIME_DIR/wl-pasteerrors match one commenter's case. Pointing at the WSLg socket fixed it for them: runexport WAYLAND_DISPLAY=/mnt/wslg/runtime-dir/wayland-0before startingopencode.5.15.167.4) fixed it by updating WSL to 3.0.3.0 (wsl --update).The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.