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
Can't Paste content from clipboard #909: Can't Paste content from clipboard - Very similar issue where clipboard content isn't pasting despite showing copy feedback
I have xclip, xsel, and wl-clipboard installed and Copy is still not working.. nothing is on my clipboard at all - Ubuntu 22.04 - default Gnome-based terminal.
I keep coming back to try opencode every few months, but this type of issue suggests to me that nobody is really using opencode on a linux desktop or that linux is a second class citizen in the eyes of opencode, because an inability to copy/paste is a foundational part of any application, full stop. Opencode is the only terminal application I have used on Ubuntu in several years that blocks copying & pasting.
we definitely don't view it as a second class citizen, some of the maintainers have/currently use arch. The tui is currently being rewritten and I think these pesky issues that are behaving inconsistently for some OS/terminals should be fewer and further between
Hope to have this better addressed for you very soon.
I keep coming back to try opencode every few months, but this type of issue suggests to me that nobody is really using opencode on a linux desktop or that linux is a second class citizen in the eyes of opencode, because an inability to copy/paste is a foundational part of any application, full stop. Opencode is the only terminal application I have used on Ubuntu in several years that blocks copying & pasting.
I use Pop-os, I just had to install the package in the troubleshot page and it worked. Pay some respect to OSS maintainers please.
Looks like somebody fixed it, still a bit odd (on Ubuntu 25 Wayland the user hsa to click on an icon that shows up in the dock in order to get the content onto the clipboard) but it works even with that extra step, thanks!
I am running latest v0.15.10, running on a remote machine via ssh. If I use mac terminal to ssh copy and paste doesn't work, I've tried tmux and other suggestions from chatgpt, but I cannot get it to work. If I connect to the machine through vscode ssh and run opencode from a vscode terminal, copy and paste does work. Any suggestions on getting it to work in mac terminal? Actually I just downloaded iterm and it works (I'm on gf macbook, also too old for ghostty), so I'm happy now, anyway leaving this here for additional data. Prob just conclude that mac terminal is shit and shouldn't be used.
FWIW, it's working for me on Ubuntu now, i've tried VS Code terminal, Ptyxis, and default Terminal. What it does on Ubuntu is non-obvious, you THINK it is not copying, but if you go look at your dock, you'll see a little settings icon pop up, you have to manually click that icon to get whatever is in the opencode buffer into your clipboard. Super annoying at first, now kind of don't notice it except when I have copied something previously and forgotten, then you have to click it once for each copy you didn't previously retrieve from buffer.
Definitely odd behavior though, I've never seen that in any app.
Putting this here for anyone else searching this issue like I was: I installed xsel and then if I am holding shift and selecting the text I am able to paste what I selected with right click.. Without shift, it doesn't work. Not sure if xsel is key here or not as I haven't tried without it.
Putting this here for anyone else searching this issue like I was: I installed xsel and then if I am holding shift and selecting the text I am able to paste what I selected with right click.. Without shift, it doesn't work. Not sure if xsel is key here or not as I haven't tried without it.
Please could the guys from Opencode please add this to the troubleshooting page...
Just want to give some feedback: Installing xclip made it work for me - but it took me a long time to find this out, since the terminal I use is one other than the recommended ones and so I just assumed it was a glitch with the terminal.
I feel like you should print some warning if xclip/whatever is required and not installed, rather than just silently failing.
Aside from this, I prefer an option to allow natural terminal copy and paste rather than "auto copy when mouse is released" since that is how every other terminal software works.
Activity
github-actions commentedon Sep 4, 2025
This issue might be a duplicate of existing issues. Please check:
panic: runtime error: index out of range [-1]#792: Sharing a session results inpanic: runtime error: index out of range [-1]- Clipboard-related panic issues on LinuxFeel free to ignore if none of these address your specific case.
vasilvestre commentedon Sep 4, 2025
I may have missed this documentation and no issue I saw were about this. Sorry ! https://opencode.ai/docs/troubleshooting/#copypaste-not-working-on-linux
alexellis commentedon Sep 18, 2025
I have xclip, xsel, and wl-clipboard installed and Copy is still not working.. nothing is on my clipboard at all - Ubuntu 22.04 - default Gnome-based terminal.
Any suggestions @vasilvestre / @adamdotdevin ?
Perhaps if there's an issue using the clipboard - it should error/warn the user?
alexellis commentedon Sep 18, 2025
Looks like you have to hard exit opencode to get it to detect/pick-up the clipboard packages. Thanks
SvenMeyer commentedon Oct 3, 2025
I have the same issue which I just reported and closed after the bot told me that this issue is already covered here.
#2948 (comment)
SvenMeyer commentedon Oct 3, 2025
opencode is at this stage unusable for me, so back to claude code
arlogilbert commentedon Oct 6, 2025
I keep coming back to try opencode every few months, but this type of issue suggests to me that nobody is really using opencode on a linux desktop or that linux is a second class citizen in the eyes of opencode, because an inability to copy/paste is a foundational part of any application, full stop. Opencode is the only terminal application I have used on Ubuntu in several years that blocks copying & pasting.
rekram1-node commentedon Oct 6, 2025
we definitely don't view it as a second class citizen, some of the maintainers have/currently use arch. The tui is currently being rewritten and I think these pesky issues that are behaving inconsistently for some OS/terminals should be fewer and further between
Hope to have this better addressed for you very soon.
vasilvestre commentedon Oct 7, 2025
I use Pop-os, I just had to install the package in the troubleshot page and it worked. Pay some respect to OSS maintainers please.
arlogilbert commentedon Oct 7, 2025
I am paying respect by reporting that the bug exists and conveying honestly what I'm experiencing as a user.
I could have fixed it myself for myself and not reported it as most people do with Ubuntu desktop apps.
Fix it, don't fix it, it's not my problem. You're welcome.
rekram1-node commentedon Oct 7, 2025
it's all good, we welcome feedback, thank you for your honesty @arlogilbert
arlogilbert commentedon Oct 9, 2025
Looks like somebody fixed it, still a bit odd (on Ubuntu 25 Wayland the user hsa to click on an icon that shows up in the dock in order to get the content onto the clipboard) but it works even with that extra step, thanks!
ispyinternet commentedon Oct 21, 2025
I am running latest v0.15.10, running on a remote machine via ssh. If I use mac terminal to ssh copy and paste doesn't work, I've tried tmux and other suggestions from chatgpt, but I cannot get it to work. If I connect to the machine through vscode ssh and run opencode from a vscode terminal, copy and paste does work. Any suggestions on getting it to work in mac terminal? Actually I just downloaded iterm and it works (I'm on gf macbook, also too old for ghostty), so I'm happy now, anyway leaving this here for additional data. Prob just conclude that mac terminal is shit and shouldn't be used.
rekram1-node commentedon Oct 21, 2025
mac terminal isnt the best yeah, we are also shipping a rewrite of the tui this week, may fix ur issue
arlogilbert commentedon Nov 5, 2025
FWIW, it's working for me on Ubuntu now, i've tried VS Code terminal, Ptyxis, and default Terminal. What it does on Ubuntu is non-obvious, you THINK it is not copying, but if you go look at your dock, you'll see a little settings icon pop up, you have to manually click that icon to get whatever is in the opencode buffer into your clipboard. Super annoying at first, now kind of don't notice it except when I have copied something previously and forgotten, then you have to click it once for each copy you didn't previously retrieve from buffer.
Definitely odd behavior though, I've never seen that in any app.
ironbelly commentedon Dec 23, 2025
Putting this here for anyone else searching this issue like I was: I installed xsel and then if I am holding shift and selecting the text I am able to paste what I selected with right click.. Without shift, it doesn't work. Not sure if xsel is key here or not as I haven't tried without it.
skoenman commentedon Jan 14, 2026
Please could the guys from Opencode please add this to the troubleshooting page...
matannagar-factorial commentedon Feb 17, 2026
not working for me :( sometimes yes and other not
bobbles911 commentedon Feb 20, 2026
Just want to give some feedback: Installing xclip made it work for me - but it took me a long time to find this out, since the terminal I use is one other than the recommended ones and so I just assumed it was a glitch with the terminal.
I feel like you should print some warning if xclip/whatever is required and not installed, rather than just silently failing.
Aside from this, I prefer an option to allow natural terminal copy and paste rather than "auto copy when mouse is released" since that is how every other terminal software works.
but otherwise thanks for some great software :P
bartoszb-dev commentedon Feb 23, 2026
I can confirm that xclip is needed for copy to work on Ubuntu 22.04 with gnome terminal, thank you @bobbles911
demeesterroeland commentedon Mar 24, 2026
I can also confirm on Ubuntu 25.10 "Questing" that installing xclip helps.
To fix
Close opencode-cli
/>sudo apt install xclip
/>opencode-cli
select text with mouse now correctly copies to clipboard..
vasilvestre commentedon Mar 25, 2026
Visit this link if you have an issue. The workaround are already knowned. https://opencode.ai/docs/troubleshooting/#copypaste-not-working-on-linux