Repository navigation
Description
Description
Ctrl+V (prompt.paste) does nothing on my machine — no paste, no toast, no log line — for both text and images. Ctrl+Shift+V (terminal paste) still works for text, so the prompt itself is fine.
The clipboard read returns status unsupported, and the TUI maps that to "nothing to paste":
packages/tui/src/clipboard.ts:read()maps the service statusesunsupported,empty, andcancelledtoreturn undefined; onlyfailed,timed-out, andlimit-exceededthrow.packages/tui/src/component/prompt/index.tsx:enqueuePasteshowstoast.erroronly for thrown errors, sounsupportedproduces zero feedback.~/.local/share/opencode/log/opencode.logstays clean as well.
Why the read is unsupported here: GNOME's mutter has no zwlr_data_control_manager_v1/ext_data_control_manager_v1, and the native clipboard library's core wl_data_device fallback is WSL-only; the X11 fallback dlopens libxcb.so.1, which a Nix-linked process cannot resolve (host /lib64 is invisible to Nix's loader). Verified with a bun harness against @opentui/core 0.8.1: createHostClipboard().read({ preferredTypes: ["image/png","text/plain"], selection: "clipboard" }) returns {status:"unsupported"} with either text or an image on the clipboard.
Making those X11 libs visible to the Nix-built binary (prepend Nix libxcb/libXau/libXdmcp to LD_LIBRARY_PATH) makes the same 2.2.1 binary paste both text and images correctly — so the only opencode-side defect is the silence. Related: #49895 reports the same silent-undefined symptom class on WSL with the old external-tools implementation.
Suggested fix: treat unsupported as visible feedback — a toast or at least a debug log line naming the status, so a dead clipboard key is diagnosable.
Plugins
opencode-secrets, rtk, sound-notify, @tarquinen/opencode-dcp
OpenCode version
2.2.1
Steps to reproduce
- Install opencode via Nix on a GNOME Wayland desktop (mutter without data-control protocols).
- Put text on the clipboard (
wl-copy hello). - Open the TUI, focus the prompt, press Ctrl+V.
- Nothing happens: no paste, no toast, no log entry.
- Control: Ctrl+Shift+V (terminal paste) inserts the text; images cannot be pasted at all.
Expected: either the paste works (environment permitting) or an error/toast explains why it cannot.
Screenshot
A silent failure produces nothing to screenshot — the keypress has zero visible effect.
Operating System
Fedora 44 host, Nix-managed packages; GNOME Shell 50.4 on Wayland (mutter, Xwayland available)
Terminal
Ghostty 1.4.0
Activity
opencodejr commentedon Nov 1, 2026
Thanks for the detailed report and the root-cause analysis. I could reproduce the silent failure.
The sandbox has no display, so the native clipboard read returns
{status: "unsupported"}, the same status you get on GNOME Wayland with Nix. On@opencode/[email protected]I typed into the prompt and pressed Ctrl+V twice. Nothing was pasted and no toast or other feedback appeared. The recording and screenshot below show this, and the script below reproduces it. It still happens on the latestdev(8c750e37):read()inpackages/tui/src/clipboard.tsstill returnsundefinedforunsupported, andprompt.pastetreats that as "nothing to paste".I didn't test the Nix packaging side. From reading
nix/opencode.nix, the wrapper adds onlywaylandtoLD_LIBRARY_PATHand not the X11 libraries (libxcb, libXau, libXdmcp), which fits your finding. I've passed both points on to the maintainers.Related:
recording.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.jimmyallinai commentedon Nov 1, 2026
I'll take a look at this. Plan: reproduce at the adapter level (a stubbed clipboard read returning
unsupportedcurrently resolves toundefined, soprompt.pastestays silent), then makeunsupportedsurface through the existing error path inpackages/tui/src/clipboard.tsso the paste command shows a toast instead of doing nothing, keepingempty/cancelledsilent. I'll add a regression test topackages/tui/test/clipboard.test.tsand run the tui clipboard tests plus typecheck before opening a PR.