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
tui: paste/drag-drop image attachments not supported in chat prompt #44310
The v2 TUI does not support pasting or drag-and-dropping images into the
chat prompt. According to the v2 attachments documentation, "Desktop and
web clients provide Attach file, paste, and drag-and-drop controls for
supported text and image files", but those controls are not surfaced in
the TUI. As a workaround, the screenshot has to be saved to a file in
the working directory and explicitly read by the model.
Install/channel: local/next (side-by-side with opencode v1 1.18.21)
Active plugins: none
Reproduction
Copy an image to the clipboard (e.g. via satty, grim, or any
screenshot tool).
Launch opencode2 and open a session.
In the chat prompt, paste the image (Ctrl+Shift+V, middle-click,
etc.) and/or drag-and-drop an image file onto the TUI.
Observe that nothing is attached to the outgoing message.
Expected Behavior
Per the v2 attachments documentation, paste and drag-and-drop controls
should be available to attach PNG/JPEG/GIF/WebP images to a prompt so
the model receives them as image media, without needing to save them to
a file first.
Actual Behavior
Both paste and drag-and-drop are silently ignored by the TUI prompt.
The only workaround is to save the screenshot to a file in the working
directory and prompt the model with the file path, e.g. "can you check
the img i put in the dir and tell me what it is?".
Related quote: "Desktop and web clients provide Attach file, paste,
and drag-and-drop controls for supported text and image files."
Many modern terminals expose clipboard images via escape sequences
(Kitty/iTerm2 image protocol, OSC 52, etc.) or support Sixel/iTerm2
inline-image queries. Even without inline display, capturing pasted
image data and persisting it to a temporary attachment file would be
enough to satisfy the documented contract.
This was also filed against the opencode v1 TUI in spirit; this
report is specifically about the v2 (opencode2) binary.
changed the title [-]tui: pasting images into the chat prompt is not supported[/-][+]tui: paste/drag-drop image attachments not supported in chat prompt[/+]on Aug 23, 2026
I think I found an important clue for this on Windows 11.
Image/screenshot clipboard paste in opencode2 does not work for me when OpenCode is launched normally.
However, if I launch the terminal / opencode2 elevated (Run as Administrator), pasting the exact same screenshot from the Windows clipboard works.
Reproduction on Windows 11:
Take a screenshot/snippet so the image is in the Windows clipboard.
Launch opencode2 normally.
Try to paste the screenshot into the TUI → image paste does not work.
Close it.
Launch the terminal as Administrator and start opencode2.
Paste a screenshot again → image paste works.
So this appears to be dependent on the Windows process security/elevation context.
There may be some clipboard-access/integrity-level issue in the Windows clipboard-reading path. I wouldn’t call that confirmed yet, but the elevated vs. non-elevated behavior is consistently reproducible on my machine.
It may be useful to compare which Windows clipboard API/process is being invoked by opencode2 in the two cases.
Thanks for the report! TUI image attachments are supported in 2.0.4, including a Nix/Wayland clipboard fix: select an image-capable model, then press Ctrl+V to attach a clipboard image or drag an image file into the prompt. Update with opencode upgrade or npm i -g @opencode/cli@latest (desktop: update the app). Please comment or reopen if this still happens on that version or later.
Activity
[-]tui: pasting images into the chat prompt is not supported[/-][+]tui: paste/drag-drop image attachments not supported in chat prompt[/+]github-actions commentedon Aug 23, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is not covered by these, please add any additional context that distinguishes it.
redstonepro109 commentedon Sep 5, 2026
I think I found an important clue for this on Windows 11.
Image/screenshot clipboard paste in opencode2 does not work for me when OpenCode is launched normally.
However, if I launch the terminal / opencode2 elevated (Run as Administrator), pasting the exact same screenshot from the Windows clipboard works.
Reproduction on Windows 11:
So this appears to be dependent on the Windows process security/elevation context.
There may be some clipboard-access/integrity-level issue in the Windows clipboard-reading path. I wouldn’t call that confirmed yet, but the elevated vs. non-elevated behavior is consistently reproducible on my machine.
It may be useful to compare which Windows clipboard API/process is being invoked by opencode2 in the two cases.
neriousy commentedon Oct 20, 2026
Thanks for the report! TUI image attachments are supported in 2.0.4, including a Nix/Wayland clipboard fix: select an image-capable model, then press Ctrl+V to attach a clipboard image or drag an image file into the prompt. Update with
opencode upgradeornpm i -g @opencode/cli@latest(desktop: update the app). Please comment or reopen if this still happens on that version or later.