GeezerVison is showing github.com — “Copied to clipboard” doesn't work · Issue #41470 · anomalyco/opencode
“Copied to clipboard” doesn't work #41470DescriptionDescription
When using OpenCode inside VSCode Server (Docker environment), copying text from an OpenCode session shows the message Copied to clipboard, but the text is not actually copied to the system clipboard and cannot be pasted elsewhere.
Plugins
None
OpenCode version
1.18.14
Steps to reproduce
- Start VSCode Server inside a Docker container.
- Run OpenCode 1.18.14 in VSCode Server.
- Select some text in an OpenCode session and copy it.
- OpenCode displays: [Copied to clipboard]
- Try to paste the copied text into another application, terminal, or editor.
Expected Behavior:
After copying, the selected text should be available in the system clipboard and should be possible to paste into other applications or terminals.
Actual Behavior:
Although OpenCode displays: [Copied to clipboard], the text is not actually copied to the clipboard, and nothing can be pasted elsewhere.
Screenshot and/or share link
No response
Operating System
Linux version 5.15.0-164-generic (buildd@lcy02-amd64-114) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025
Terminal
bash Reacted by Daniele Dellafiore Activitygithub-actions commented on Aug 10, 2026 This issue might be a duplicate of existing issues. Please check:
If your issue is specifically about the VSCode Server / Docker environment, #26459 is likely the most relevant existing report. ildella commented on Aug 11, 2026 I can confirm today copy to clipboard stopped working for me as well in latest opencode2 running in standard Ubuntu Linux from terminal.
The overlay message "copied to clipboard" still appears, but there is nothing in it. ildella commented on Aug 12, 2026 This is what is printed in the input text area when I copy something to clipboard.
Confirmed again with very latest opencode2 upgraded a few minutes ago with service restart as well.
 ildella commented on Aug 12, 2026 I cleaned up all install via npm. Then reinstalled with the latest bash script
curl -fsSL https://raw.githubusercontent.com/anomalyco/opencode/v2/install | bash
Still same issue as before.
Also I realised that CTRL+V or CTRL+SHIFT+V do not do anything anymore when an image is in the clipboard.
I can just paste text with CTRL+SHIFT+V as normally.
A better screenshot of last version.  simonklee commented on Aug 12, 2026 These are two different issues, but i'm very interested in the latter. @ildella do you mind sharing what your env is:
- which ubuntu version
- which terminal
- x11 or wayland
ildella commented on Aug 12, 2026 simonklee commented on Aug 12, 2026
Ubuntu 26.04 wayland.
The same behavior happens in both in Classic gnome terminal, Version 3.58.0 for GNOME 49 as well as in the new default https://gitlab.gnome.org/chergert/ptyxis version 50.1.
Thank! I'll try to reproduce. ildella commented on Aug 12, 2026 Thanks! I already asked "opencode" - I have the repo on my machine - to investigate... but could not find anything. If you have some prompt you want me to try, pass it along. simonklee commented on Aug 12, 2026 No, i've just implemented the clipboard support in opentui (terminal library used for opencode) instead of us doing subprocess calls to xclip / wl-copy in opencode. So its an issue with my new package. Reacted by Daniele Dellafiore simonklee commented on Aug 12, 2026 I have a fix locally that i'll push to v2 later tonight. Thanks for the help so far. Reacted by Daniele Dellafiore simonklee commented on Aug 12, 2026 I've pushed my change to v2 branch but gh ci is broke today so i dont know when there is a new build. Let me know if this still doesnt work for you. WqxLoveCoding commented on Aug 13, 2026 Update: When I paste the “copied content” into another location (such as Notepad or a chat window), it never works (it seems as though the ‘Copy’ function isn't working, rather than the “Paste” function). simonklee commented on Aug 13, 2026
Update: When I paste the “copied content” into another location (such as Notepad or a chat window), it never works (it seems as though the ‘Copy’ function isn't working, rather than the “Paste” function).
What is your system, which opencode version are you on? ildella commented on Aug 13, 2026 Just run the installer. Both issues fixed for me. simonklee commented on Aug 13, 2026
Just run the installer. Both issues fixed for me.
Awesome, thanks for following up! WqxLoveCoding commented on Aug 17, 2026
Update: When I paste the “copied content” into another location (such as Notepad or a chat window), it never works (it seems as though the ‘Copy’ function isn't working, rather than the “Paste” function).
What is your system, which opencode version are you on?
Sorry for the late reply.
OpenCode version (latest): 1.18.18
System: ubuntu 22.04
run in code-server (web-ide) moekhalil commented on Aug 19, 2026 If you are using tmux, in your tmux conf insert the following line:
set -g allow-passthrough on StevenB0ss commented on Aug 24, 2026 I had the same problem with Junie, I asked their support and you need to "sudo apt install wl-clipboard" and that works for opencode too simonklee commented on Aug 24, 2026
I had the same problem with Junie, I asked their support and you need to "sudo apt install wl-clipboard" and that works for opencode too
There are two concepts going on. One, which is what you're describing, which is what we're using in the current production version of OpenCode. And secondly, what I have implemented in the beta version of OpenCode, where this isn't required anymore. We're linking against the Wayland clipboard libraries directly.
In this issue, we have people who are describing both systems. StevenB0ss commented on Aug 25, 2026
I had the same problem with Junie, I asked their support and you need to "sudo apt install wl-clipboard" and that works for opencode too
There are two concepts going on. One, which is what you're describing, which is what we're using in the current production version of OpenCode. And secondly, what I have implemented in the beta version of OpenCode, where this isn't required anymore. We're linking against the Wayland clipboard libraries directly.
In this issue, we have people who are describing both systems.
Yes I would love to see have the version that does not rely on an external library, but for a quick fix it will work for people who can't wait. simonklee commented on Aug 25, 2026
I had the same problem with Junie, I asked their support and you need to "sudo apt install wl-clipboard" and that works for opencode too
There are two concepts going on. One, which is what you're describing, which is what we're using in the current production version of OpenCode. And secondly, what I have implemented in the beta version of OpenCode, where this isn't required anymore. We're linking against the Wayland clipboard libraries directly.
In this issue, we have people who are describing both systems.
Yes I would love to see have the version that does not rely on an external library, but for a quick fix it will work for people who can't wait.
https://opencode.ai/v2/docs disarticulate commented on Sep 12, 2026 copy paste doesnt work anywhere because who ever decided to override normal terminal behavior fails to read issues. OberdanBrito commented on Sep 17, 2026 Same issue here on Ubuntu (Linux 5.15, no Wayland, standard GNOME Terminal).
Reproduction: select text in OpenCode TUI → toast shows "Copied to clipboard" → nothing in system clipboard.
Root cause: no xclip/xsel/wl-copy installed, and no fallback. The clipboard write fails silently, but the success toast still fires.
Workaround: sudo apt-get install -y xclip fixes it immediately.
It seems PR #44394 (pure-JS X11 clipboard) was closed without merge. That would be the proper fix for environments without clipboard tools. Any chance of revisiting it? thdxr commented on Oct 11, 2026 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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|