bug: pasting an image into Codex or OpenCode in the in-app terminal does nothing
Author: gerardbalaoroCreated Aug 23, 2026Updated Sep 18, 2026
Labelsbugp2triaged
What's broken
I copied an image to the clipboard and pressed Ctrl+V into a Codex TUI running in Paseo's in-app terminal. In a regular terminal (Windows Terminal, iTerm2) this attaches the image to the prompt. In Paseo nothing happens at all. No error, no feedback. Text paste works normally.
Steps to reproduce
- Open the desktop app
- Start a Codex or OpenCode agent so its TUI runs in the in-app terminal
- Copy an image to the clipboard (a screenshot works)
- Focus the terminal and press Ctrl+V
- Nothing happens. The same paste in Windows Terminal attaches the image.
Where did this happen
Desktop (Electron). Reproduces on Web (browser) too.
Paseo version
0.5.0-beta.5
OS version
Windows 11
Agent provider
Codex. OpenCode behaves the same.
Provider configuration
Codex CLI 0.149.0, OpenCode 1.18.21
Logs
None. Both sides fail silently, so daemon.log shows nothing around the repro.
Evidence (source reading at 0.5.0-beta.5)
These CLIs don't receive image bytes through the pty. They bind Ctrl+V and read the OS clipboard themselves when the keystroke arrives:
- Codex uses arboard (
codex-rs/tui/src/clipboard_paste.rs, Alt+V on native Windows) - OpenCode shells out to osascript / wl-paste / xclip / PowerShell (
packages/opencode/src/cli/cmd/tui/util/clipboard.ts)
So paste-image needs the terminal to forward \x16 instead of eating it. Paseo eats it:
packages/app/src/terminal/runtime/terminal-emulator-runtime.ts:430-440intercepts the Ctrl+V keydown, callsnavigator.clipboard.readText(), and returns before xterm can emit the key.packages/app/src/terminal/runtime/terminal-paste.ts:32-35reads clipboard text and returns early when empty. An image-only clipboard reads as empty.packages/app/src/components/terminal-pane.tsx:292enables the mobile Paste button only whenClipboard.hasStringAsync()is true, so an image-only clipboard never even unlocks the button.- No binary channel exists on the wire either.
TerminalClientMessageSchematypes input asz.string()(packages/protocol/src/messages.ts:2830) and the binary-frame Input opcode string-encodes (packages/protocol/src/binary-frames/terminal.ts).
Source: getpaseo/paseo