Image paste fails with 'no image on clipboard' despite screenshot copy
What happened?
Pasting a screenshot/image into Codex repeatedly failed. The UI reported that no image was available on the clipboard, even though the user was attempting to paste a screenshot for debugging.
Observed error, repeated several times:
Failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.
This blocked a normal debugging flow where the user needed to share a screenshot of Google Play Console.
Expected behavior
Codex should accept a copied screenshot/image from the clipboard, or provide a clearer fallback path when the clipboard content cannot be read.
At minimum, the error should distinguish between:
- the OS clipboard actually being empty
- the clipboard containing an image in an unsupported format
- the Codex client failing to access the clipboard image
- WSL/Windows clipboard interop limitations
Environment
- Codex CLI:
codex-cli 0.142.2 - OS/session: WSL2 on Windows
- Kernel:
Linux BigFatty 6.18.33.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Fri Jun 5 01:12:21 UTC 2026 x86_64 GNU/Linux - Workspace path:
/mnt/d/repos/fountainrank
Additional context
As a workaround, I tried to pull the image from the Windows clipboard through WSL with PowerShell, but Windows executable interop was not working in this session:
/bin/bash: line 1: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe: cannot execute binary file: Exec format error
That workaround failure is separate, but it made the missing image-paste support more disruptive because there was no usable in-chat path to attach the screenshot.
Repro steps
- Copy a screenshot/image to the clipboard.
- Attempt to paste it into Codex chat.
- Observe the paste failure:
Failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional clarification from the affected session: the core failure is that the user cannot paste an image into Codex at all.
The user repeatedly attempted to paste a screenshot for debugging, and Codex rejected it with:
This is not just a confusing error message. It blocks the basic workflow of sharing a screenshot with Codex when the UI being debugged cannot be described reliably in text.
Severity clarification: this is blocking active work.
Impact:
This should be treated as an imperative workflow blocker, not a cosmetic clipboard-message bug.
I pushed a focused improvement for the WSL failure mode described here:
https://github.com/openai/codex/compare/main...Nicolas0315:codex/wsl-image-paste-fallback-error?expand=1
Commit:
6fa8c1aae5118f2427261b4380211b56f2ed5504What changed:
no image on clipboardmessage.powershell.exe,pwsh, andpowershell, including execution errors like WSL interop/Exec format error, non-zero status, empty output, unsupported returned paths, or unreadable generated PNGs.Validation:
rtx4090:just fmt,git diff --check,cargo check -p codex-tui,cargo test -p codex-tui wsl_clipboard_fallback_error_display_preserves_both_contexts, andcargo test -p codex-tui clipboard_pastepassed.cargo: command not found).cyberagent-mac-m5maxover SSH: exact commit checkout,git diff --check,cargo test -p codex-tui clipboard_paste, andcargo check -p codex-tuipassed.nicolas2025over SSH: exact commit checkout,git diff --check,cargo test -p codex-tui clipboard_paste, andcargo check -p codex-tuipassed; no lingering cargo/rustc/link processes.nicolas-macbook-proover SSH: exact commit checkout andgit diff --checkpassed; no Rust toolchain installed there.rtx5060tiover SSH: exact commit checkout andgit diff --checkpassed; cargo remains blocked by the host's existing linker setup (link.exerejects MSVC-style arguments), with no lingering cargo/rustc/link processes afterward.