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
clipboard copy not works in remote SSH console. #2773
Yes, proper osc52 handling is missing, opencode currently only copies to local clipboard. Opentui should provide a copyToClipboard method to handle that properly.
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.
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! 😆
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.
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.
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…
Activity
github-actions commentedon Sep 25, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Sep 25, 2025
This should be fixed in next version of the tui, rn it is being rewritten: #2685
W1BTR commentedon Nov 21, 2025
Still having this issue on opencode installed today. Has this new TUI been released yet?
rekram1-node commentedon Nov 21, 2025
yeah, maybe a tmux issue for u?
kommander commentedon Nov 22, 2025
Yes, proper osc52 handling is missing, opencode currently only copies to local clipboard. Opentui should provide a copyToClipboard method to handle that properly.
thevinchi commentedon Nov 23, 2025
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.
travofoz commentedon Nov 26, 2025
im on 114 and the issue persists. it is extremely frustrating
aaronnewsome commentedon Dec 7, 2025
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.
b3nw commentedon Dec 24, 2025
1.0.193 using ssh/MobaXterm this is still broken.
16 remaining items
Rhiz3K commentedon Jan 16, 2026
this is driving me crazy as I only use opencode on remote machine via SSH
feat(clipboard): add OSC 52 clipboard support for SSH/remote sessions
fix(clipboard): improve OSC 52 escape sequence for SSH compatibility
fix(clipboard): improve OSC 52 escape sequence for SSH compatibility
fix: centralize OSC 52 clipboard support for SSH sessions (resolves a…
thevinchi commentedon Jan 20, 2026
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! 😆
Trynox-by-Fasky commentedon Sep 21, 2026
almost the end of 2026 and this issue is still not resolved....
aaronnewsome commentedon Sep 21, 2026
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.
niicolaai commentedon Sep 22, 2026
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.
Trynox-by-Fasky commentedon Sep 22, 2026
@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…