Skip to content

clipboard copy not works in remote SSH console. #2773

Closed

Description

@magic-thomas

hi .
Sometimes I use opencode / claude code in remote SSH console.

Claude Code allows copy selected text.

But I can not copy text in remote console with Opencode.

Is it intended or missing or is there a way to copy text ?

Activity

  1. github-actions commented on Sep 25, 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.

  2. rekram1-node commented on Sep 25, 2025

    @rekram1-node
    Contributor

    This should be fixed in next version of the tui, rn it is being rewritten: #2685

  3. W1BTR commented on Nov 21, 2025

    @W1BTR

    Still having this issue on opencode installed today. Has this new TUI been released yet?

  4. rekram1-node commented on Nov 21, 2025

    @rekram1-node
    Contributor

    yeah, maybe a tmux issue for u?

  5. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 21, 2025
  6. kommander commented on Nov 22, 2025

    @kommander
    Contributor

    Yes, proper osc52 handling is missing, opencode currently only copies to local clipboard. Opentui should provide a copyToClipboard method to handle that properly.

  7. thevinchi commented on Nov 23, 2025

    @thevinchi
    Contributor

    fwiw: I'm having this issue as well. I use tmux, but it WAS working fine before the 1.0 release. That's when copy broke for me.

  8. travofoz commented on Nov 26, 2025

    @travofoz

    im on 114 and the issue persists. it is extremely frustrating

  9. aaronnewsome commented on Dec 7, 2025

    @aaronnewsome

    i tried a lot of ways to get select text and copy to clipboard working with opencode in an ssh session. the only thing I could get to work was to use guacamole and ssh. it works but i'd rather not have to use this method.

    how are others successfully able to copy text over an ssh session? why has this been such a persistent problem? most other terminal coders don't have this issue.

    i really like opencode and it's my daily driver but this copy thing has me vexed for real.

    my current workflow is to work normally in a regular tmux/ssh session. then in the rare case where I have to copy something, i fire up a guacamole session, ssh into the host, tmux attach, select the text, which gets copied into the clipboard of the browser/host where i'm sitting. tmux detach then go back to my regular terminal.

    it works, but what a hack. i should be able to just select and copy text like any other terminal.

    sometimes I can get the text with the /export command and once in vim select copy works normally, but that always doesn't work since not everything in the conversation shows up in the export.

    I, for one would be very pleased if this issue were fixed.

  10. b3nw commented on Dec 24, 2025

    @b3nw
    Contributor

    1.0.193 using ssh/MobaXterm this is still broken.

  11. 16 remaining items

  12. Rhiz3K commented on Jan 16, 2026

    @Rhiz3K

    this is driving me crazy as I only use opencode on remote machine via SSH

  13. added a commit that references this issue on Jan 17, 2026
    97b3ff7
  14. thevinchi commented on Jan 20, 2026

    @thevinchi
    Contributor

    FYI: This has been resolved for me as of 1.1.26 (shuv1337#309)

    I see that #9374 is now open, so hopefully whatever is needed to resolve that issue doesn't break whatever is allowing me to copy to clipboard again! 😆

  15. Trynox-by-Fasky commented on Sep 21, 2026

    @Trynox-by-Fasky

    almost the end of 2026 and this issue is still not resolved....

  16. aaronnewsome commented on Sep 21, 2026

    @aaronnewsome

    almost the end of 2026 and this issue is still not resolved....

    no one with any authority to do anything about it, sees this as an issue to be fixed. this means you can check back in another year and it's not likely to be addressed by then either.

    opencode works great when I'm working on the computer I'm sitting in front of, which is RARELY. 95% of the time my coding agent is running in a remote session, via ssh or docker exec shell. one of the many reason I switched to pi a long time ago and have never looked back.

  17. niicolaai commented on Sep 22, 2026

    @niicolaai

    Quick workaround until it's fixed that works for me: Connect to your remote server via SSH through VSCode and from there open up a terminal in a new window (top toolbar → Terminal → New Terminal Window OR Ctrl + Shift + Alt + `). Open up opencode from there as usual and copying now works.

  18. Trynox-by-Fasky commented on Sep 22, 2026

    @Trynox-by-Fasky

    Quick workaround until it's fixed that works for me: Connect to your remote server via SSH through VSCode and from there open up a terminal in a new window (top toolbar → Terminal → New Terminal Window OR Ctrl + Shift + Alt + `). Open up opencode from there as usual and copying now works.

    @niicolaai thanks for the solution but i mostly use my vps with ssh like this on my iphone while i’m not at home so it won’t work for me…

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

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions