Pasting plain text shows '■ Failed to paste image: no image on clipboard' on WSL/Linux

Resolved 💬 2 comments Opened Apr 26, 2026 by i-trytoohard Closed Apr 26, 2026

Bug

When pasting plain text (Ctrl+V) into the Codex CLI, the following error appears instead of (or before) the text being pasted:

■ Failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.

Steps to Reproduce

  1. Run Codex CLI (v0.120+) inside a terminal on WSL (Windows Subsystem for Linux)
  2. Copy some plain text to the clipboard
  3. Press Ctrl+V to paste into Codex's input

Expected Behavior

Text is pasted normally into the input field.

Actual Behavior

Error message shown: ■ Failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.

Text paste may not work at all.

Environment

  • OS: WSL (Windows Subsystem for Linux) — likely also affects bare-metal Linux/X11
  • Codex version: 0.120.0, 0.121.0
  • Terminal: xterm.js (via Agent Orchestrator web dashboard, tmux PTY)
  • macOS and Linux+Wayland users do not see this issue

Root Cause

Codex's paste handler (built on the arboard Rust crate) attempts to read the clipboard as an image first on X11-based systems. On WSL, the X11 clipboard integration with Windows is either missing or incomplete, so arboard fails with:

"The clipboard contents were not available in the requested format or the clipboard is empty."

Codex surfaces this error instead of gracefully falling through to text paste.

The fix should be: catch the image-read error from arboard and fall through to text paste, rather than surfacing it as a blocking error. Image paste is a nice-to-have — text paste is essential.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗