Skip to content

Copy To Clipboard is not working #4283

Closed as not planned
Closed as not planned

Description

@maheshmuttintidev

Description

I selected some text from the response but its not copied to clipboard, please resolve this issue. these are my os related info.

OpenCode version

1.0.62

Steps to reproduce

  1. run opencode in terminal
  2. ask any question
  3. select the response text (few lines or complete)
  4. it shows copied to clipboard
  5. try to paste the (ctrl+v or cmd+v)
  6. paste won't work or it will paste last copied text other than this opencode

Screenshot and/or share link

Image Image

Operating System

24.04

Terminal

Terminal (Default Ubuntu One) and Vscode Terminal As well

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 13, 2025
  2. github-actions commented on Nov 13, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. burbilog commented on Nov 13, 2025

    @burbilog

    I have the same problem running opencode via ssh on remote machines.

  4. maheshmuttintidev commented on Nov 13, 2025

    @maheshmuttintidev
    Author

    it seems there is no straight forward fix for this issue, at-least please provide context menu on text selection and show copy option please..

  5. maheshmuttintidev commented on Nov 13, 2025

    @maheshmuttintidev
    Author

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

    i've checked above, but it doesn't resolve this bug yet, please try to escalate to author and fix this bug in future release (this maybe medium priority)

  6. velorb commented on Nov 13, 2025

    @velorb

    i have the same issue

  7. self-assigned this
    on Nov 13, 2025
  8. redknightlois commented on Nov 13, 2025

    @redknightlois

    Same issue, found it in multiline. Paste is broken it seems, because I am getting the text from a notepad.

  9. Haupc commented on Nov 21, 2025

    @Haupc

    I'm having same issue

  10. dhogenson commented on Nov 21, 2025

    @dhogenson

    Same thing here, it don't work on the default terminal but it works on vs codes terminal which is weird

  11. taqtiqa-mark commented on Nov 25, 2025

    @taqtiqa-mark

    I have noted this issue, but it has a couple of subtleties, and its not clear how to tease them out individually.

    "Select-to-copy" fails when:

    • The selection (mouse-drag) is done slowly, and unidirectionally. Almost always a 'fast', one-direction-only, select action works.
    • The selection (mouse-drag) is done fast but multi-directionally (when the drag action overshoots, and you go back).

    Note sure if that helps.

    @kommander are there any settings that might affect this feature (e.g. scroll-speed)?

  12. kommander commented on Nov 25, 2025

    @kommander
    Collaborator

    I want to provide a generalized copyToClipboard from opentui, as opencode currently does that manually and it does not work remote either because of missing osc52 handling. It's on my list, please excuse the delay, just a little more patience, I'll get to it.

  13. maheshmuttintidev commented on Nov 27, 2025

    @maheshmuttintidev
    Author

    surprisingly, the copy to clipboard is working in iterm2, but not in-built terminal, it would be better if you look into this issue, because it was more useful for me especially (the developer like me as well)

  14. ominiverdi commented on Dec 3, 2025

    @ominiverdi

    On my Linux Mint installing xclip solved the problem:

    sudo apt install xclip
    
    

    Pity that the TUI doesn't warn when a dependency is missing

  15. 134 remaining items

  16. digregoriovalerio commented on Oct 11, 2026

    @digregoriovalerio

    28. Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

    Best practices in ticket handling 🤣

  17. emsi commented on Oct 11, 2026

    @emsi

    Best practices in ticket handling 🤣

    Yeah. Peak professionalism.

  18. DSCmatter commented on Oct 11, 2026

    @DSCmatter
    Image
  19. digregoriovalerio commented on Oct 11, 2026

    @digregoriovalerio

    BTW, seems fixed for me. But now I got into pi agent for too long and started to appreciate minimalism. Also upgrade to 2.0 is painful, you need to disconnect from everything, clean cache, clean config into home and into local, then reconnect... nvidia nim was showing auth error until I made this reset.

  20. nikosmoum commented on Oct 12, 2026

    @nikosmoum

    if this is still relevant on 2.0, reopen this issue

    This is still relevant on 2.0. I just upgraded from 2.0.19 to 2.0.27, and the issue is still there.

    @thdxr I don't want to open a new issue, since there's tons of people already subscribed to this one, and they would be forced to search for it, or end up creating duplicates, so re-opening this is best. Can someone with permissions re-open please?

  21. anasfik commented on Oct 13, 2026

    @anasfik

    on latest 2.0.28 version, the issue is still there when i use opencode on a VM, and this is starting to be a trade off since even the /share command i relied on says:

    • Sharing is not implemented for V2 sessions yet

    so now i can't even move any text from it to use unless I OCR it or switch to a free model to just tell opencode to upload the conversation somewhere, tried all solutions i found but non worked.

  22. citizeneuropa09 commented on Oct 16, 2026

    @citizeneuropa09

    one year and they can't fix a copy-pasting bullshit

  23. IntraCherche commented on Oct 18, 2026

    @IntraCherche

    Upgrading from 1.8.35 to 2.0.32 solved this problem on my linux box (XFCE4-Terminal, pasting in OpenCode with ctrl-shift-v, or in geany, or Nautilus, with ctrl-v). Thank you!

  24. donbowman commented on Oct 18, 2026

    @donbowman
    Contributor

    29. Upgrading from 1.8.35 to 2.0.32 solved this problem on my linux box. Thank you!

    it does not.

    2.0.32 the copy goes to clipboard, the paste comes from selection. so you cannot copy and paste back into opencode without going to your clipboard tool and selecting the clipboard entry back to selection.

    /usr/bin/wl-paste | /usr/bin/wl-copy --primary

    i created a global hotkey running this as a workaround, but its a real pain that opencode is the only application on a linux terminal that takes over control of the selection, and, does it wrong.

    see #32370 for the PR to resolve it on v2.

  25. digregoriovalerio commented on Oct 18, 2026

    @digregoriovalerio

    its a real pain that opencode is the only application on a linux terminal that takes over control of the selection, and, does it wrong.

    actually it also leaks API keys 🤣

  26. sbgraphic commented on Oct 18, 2026

    @sbgraphic

    Hum I cannot even select anything to copy in VSC terminal opencode… (MacOS Thaoe, latest VSC Version: 1.142.0, latest Opencode 2.0.32)

  27. munderl commented on Oct 22, 2026

    @munderl

    As a workaround I am able to press shift key upon text selection which results in the text being copied into the third-mouse-button-buffer instead of the clipboard. Using gnome terminal on gnome 50.

  28. nikosmoum commented on Oct 22, 2026

    @nikosmoum

    I confirm shift+select text copies it into third-mouse-button-buffer. It's a good workaround

  29. donbowman commented on Oct 22, 2026

    @donbowman
    Contributor

    except this doesn't work for multi-line, it ends up selecting the sidebar too.

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