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
copying to clipboard doesn't work in a remote session (like a devcontainer) #8237
For example: /share is great but it appears to only support copying directly to the clipboard. It'd be nice to print the actual URL so people can copy it from a terminal themselves, or even better it'd be nice to support copying out to the host automatically.
The wrapper helped me in a vscode devcontainer:
diff --git a/.devcontainer/osc52-clipboard b/.devcontainer/osc52-clipboard
new file mode 100644
index 00000000..0f350c2b
--- /dev/null+++ b/.devcontainer/osc52-clipboard@@ -0,0 +1,17 @@+#!/bin/bash+# OSC 52 clipboard wrapper for devcontainers+# Sends clipboard data to the host terminal via OSC 52 escape sequences+# This works in VS Code terminal and most modern terminal emulators++# Read from stdin and base64 encode+data=$(cat | base64 | tr -d '\n')++# Write directly to the controlling terminal, bypassing any TUI that might+# be capturing stdout. This ensures the escape sequence reaches VS Code.+if [ -n "$TTY" ]; then+ printf "\e]52;c;%s\a" "$data" > "$TTY"+elif [ -e /dev/tty ]; then+ printf "\e]52;c;%s\a" "$data" > /dev/tty+else+ printf "\e]52;c;%s\a" "$data"+fidiff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
index 8118ff3e..0a708fbe 100644
--- a/.devcontainer/setup.sh+++ b/.devcontainer/setup.sh@@ -1,5 +1,12 @@
#!/bin/bash -ex
+# Install OSC 52 clipboard wrapper (enables clipboard in devcontainer -> host)+cp .devcontainer/osc52-clipboard /usr/local/bin/+chmod +x /usr/local/bin/osc52-clipboard+# Create symlinks so tools that call xclip/xsel use our OSC 52 wrapper+ln -sf /usr/local/bin/osc52-clipboard /usr/local/bin/xclip+ln -sf /usr/local/bin/osc52-clipboard /usr/local/bin/xsel
This issue might be a duplicate of existing issues. Please check:
* [opencode mcp auth fails silently in remote/headless sessions (SSH, devcontainer) #7887](https://github.com/anomalyco/opencode/issues/7887): opencode mcp auth fails silently in remote/headless sessions (SSH, devcontainer) - Similar issue where clipboard/browser operations don't work in remote environments and the solution involves showing the URL instead of relying on browser opening
Feel free to ignore if your specific case isn't addressed by these issues.
It's similar, but this has to do with clipboard and not xdg-open. I've also replied there with my own attempts to fix that (unrelated, IMO) issue.
I run opencode in a Docker container and have the same issue - the share URL is only copied to clipboard and not displayed anywhere on screen. In a containerized environment, the clipboard operation doesn't work, so there's no way to retrieve the URL.
Simply printing the URL to the screen (in addition to copying to clipboard) would solve this for Docker/container users too.
Activity
github-actions commentedon Jan 13, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if your specific case isn't addressed by these issues.
bretthoerner commentedon Jan 13, 2026
It's similar, but this has to do with clipboard and not xdg-open. I've also replied there with my own attempts to fix that (unrelated, IMO) issue.
leighmcculloch commentedon Jan 19, 2026
I run opencode in a Docker container and have the same issue - the share URL is only copied to clipboard and not displayed anywhere on screen. In a containerized environment, the clipboard operation doesn't work, so there's no way to retrieve the URL.
Simply printing the URL to the screen (in addition to copying to clipboard) would solve this for Docker/container users too.
kvokka commentedon Jan 21, 2026
#4283 (comment)
this helped
github-actions commentedon Mar 28, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
l-astslice commentedon Jun 1, 2026
/tui default fixes this immediately in claude code!!