Description
In the TUI, selecting text (copy-on-select) or copying a message shows a "Copied to clipboard" toast even when nothing was actually copied — the system clipboard stays empty when pasting elsewhere.
Root cause: packages/tui/src/clipboard.ts swallows every copy error with .catch(() => undefined) in both the native command and clipboardy fallback paths, so write() always resolves and every caller shows a success toast.
Plugins
none
OpenCode version
dev
Steps to reproduce
- Run opencode TUI on Linux (e.g. Ubuntu, GNOME/Wayland) where
wl-clipboard/xclip/xsel is not installed
- Drag-select some text (copy-on-select is enabled by default on Linux) or copy a message
- The "Copied to clipboard" toast appears
- Paste into another app — the clipboard is empty
Operating System
Ubuntu (GNOME/Wayland)
Terminal
GNOME Terminal
Description
In the TUI, selecting text (copy-on-select) or copying a message shows a "Copied to clipboard" toast even when nothing was actually copied — the system clipboard stays empty when pasting elsewhere.
Root cause:
packages/tui/src/clipboard.tsswallows every copy error with.catch(() => undefined)in both the native command andclipboardyfallback paths, sowrite()always resolves and every caller shows a success toast.Plugins
none
OpenCode version
dev
Steps to reproduce
wl-clipboard/xclip/xselis not installedOperating System
Ubuntu (GNOME/Wayland)
Terminal
GNOME Terminal