Skip to content

Feature request: Paste to attach image #906

Closed as not planned
Closed as not planned

Description

@Jawkx

Not sure how possible it is, but I really enjoy using excalidraw when working with opencode. I like to copy the stuff as png and then paste it in LLMs to use. But opencode only support attachment via drag and drop, wonder is it possible to implement paste to add image

Image

Activity

  1. almirsarajcic commented on Jul 12, 2025

    @almirsarajcic
    Contributor

    Correct me if I'm wrong, but you can paste using Control (not Command) + V.
    I use that all the time both in opencode and Claude Code.
    Check the keyboard shortcuts with /help.

    For example, I screenshot part of the screen with Control + Shift + Command + 4, and then paste in using Control + V.
    This is how it appears in the opencode.
    Image

  2. Jawkx commented on Jul 12, 2025

    @Jawkx
    Author

    @almirsarajcic Owh ya it works with CTRL+V.

    But IMO should work for CMD + V for Macos. But feel free to close this issue if it's redundant

  3. RomanKornev commented on Jul 12, 2025

    @RomanKornev

    I was also confused until I tried Ctrl+V instead of Cmd+V. It just doesn't feel intuitive enough.

  4. ggaabe commented on Jul 30, 2025

    @ggaabe
    Contributor

    this seems to work with CMD V?

  5. woerndl commented on Aug 31, 2025

    @woerndl

    The documentation was a bit confusing (to me at least) in this regard, it states:

    Drag and drop images into the terminal to add them to the prompt.

    For me, copy‑and‑paste attaches the image as a [Image #1] placeholder, whereas dragging and dropping only inserts the path.

  6. amanhigh commented on Sep 5, 2025

    @amanhigh

    I tried in Arch Linux and here too. Ctrl + V Normal paste doesn't work.

    For me Windows (Meta) Key + V Pasted Image. Text is pasted via Ctrl + V hence this is not intuitive

  7. jawadqur commented on Sep 17, 2025

    @jawadqur

    This would be a sick feature to have in opencode!

  8. rekram1-node commented on Sep 17, 2025

    @rekram1-node
    Collaborator

    what os and terminal are you @jawadqur pasting images works for me

  9. felipeorlando commented on Sep 18, 2025

    @felipeorlando
    Contributor

    cmd+v would be better ➕ 1️⃣

  10. sai-sy commented on Sep 29, 2025

    @sai-sy
    Contributor

    There seems to be some weirdness here with wsl2 and wezterm on recognizing there's something to paste. Not sure where to start on looking for a fix

  11. rekram1-node commented on Sep 29, 2025

    @rekram1-node
    Collaborator

    @sai-sy what happens does it just paste the path?

  12. sai-sy commented on Sep 29, 2025

    @sai-sy
    Contributor
  13. rekram1-node commented on Sep 29, 2025

    @rekram1-node
    Collaborator

    ooo @itsrainingmani note: windows image pasting doesn’t seem to work

  14. sai-sy commented on Sep 30, 2025

    @sai-sy
    Contributor

    @rekram1-node I'm gonna make a new issue since this thread seems faily mac specific. I'm also curious if this is a wezterm issue, however since wezterm is listed as being one of multiple options which are necessary to get opencode run properly, i think it's relevant

    #2878

  15. 18 remaining items

  16. ezhupa99 commented on Feb 11, 2026

    @ezhupa99

    I’m having the same issue when pasting images into the terminal, but I noticed it only happens in Windows Terminal. When I switched to Git Bash, it worked normally.

    @eduardozf and seems like opencode opens way much faster on Git Bash than in Windows Terminal, nice catch

  17. ezhupa99 commented on Mar 5, 2026

    @ezhupa99

    if you are on windows and using Terminal App below is the solution:
    #1429 (comment)

  18. morisono commented on Mar 27, 2026

    @morisono

    I notice that pasting refused only when CRLF included in image path (on WSL Ubuntu 24.04).

  19. amanhigh commented on Apr 4, 2026

    @amanhigh

    Environment:

    • Kitty: 0.46.2
    • OpenCode CLI: 1.3.13
    • OS: Arch Linux

    Problem:
    Paste (Ctrl+V) does not work in OpenCode CLI when running in Kitty terminal. This works fine in VSCode terminal but fails in Kitty. The issue is that Kitty taposs paste_from_clipboard action does not properly trigger OpenCode internal paste handler.

    Solution that works:

    In ~/.config/kitty/kitty.conf, add:
    map ctrl+v paste_from_clipboard
    map super+v send_text all \x16

    • Ctrl+V = text paste (standard Kitty clipboard)
    • Super+V (Windows key + V) = sends raw Ctrl+V character, which OpenCode interprets as paste

    Why this works:

    • paste_from_clipboard uses Kitty clipboard API, which OpenCode does not handle properly
    • send_text all \x16 sends the actual Ctrl+V (ASCII 0x16) character to the terminal, which OpenCode catches internally as paste command
    • The Super (Windows) key is used to avoid conflict with normal Ctrl+V
  20. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  21. markste-in commented on May 27, 2026

    @markste-in

    I am on MacOS with the standard Z shell.
    For me it actually works quite reliable but I would like to turn it off! I handle large satellite data and I only want to paste the path to the image in the chat but it automatically attaches the image. That is super annoying I can't find a way to turn it off. Is there a way to paste path as text ?

  22. richjdsmith commented on Jun 9, 2026

    @richjdsmith

    There seems to have been a regression of this since the most recent update. v1.16.2

    Prior to 1.16.2, I was able to paste images on Windows Terminal. Now, I am unable to.

  23. dl-alexandre commented on Jun 10, 2026

    @dl-alexandre
    Contributor

    Cross-linking a related gap: image paste/drag-drop for the main prompt is tracked here, but the question tool UI (MCQ modal shown when the agent uses question) still has no way to attach screenshots while answering.

    Filed separately as a scoped feature request so it doesn't get lost under general prompt attach work. Happy to consolidate if maintainers prefer a single umbrella issue.

    Related: #31383, #6330

  24. dl-alexandre commented on Jun 10, 2026

    @dl-alexandre
    Contributor

    Update: filed #31791 for the question-tool-specific case.

  25. github-actions commented on Aug 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions