Cannot paste image from Windows clipboard into Codex CLI on WSL (v0.66.0) Body
What version of Codex is running?
0.66.0
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
_No response_
What issue are you seeing?
When running the OpenAI Codex CLI inside WSL, I cannot paste an image from the Windows clipboard into the chat.
Codex prints Failed to paste image: no image on clipboard even though the Windows clipboard clearly contains a bitmap
screenshot and it can be pasted into other Windows apps.
This looks similar to the WSL paste fix from PR #6793 but still happens on v0.66.0.
Actual Behavior
Codex prints one or more errors like:
Failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.
The message is repeated on every attempt to paste the image.
At the same time, Windows clipboard history shows the screenshot, and pasting the same clipboard contents into other
Windows applications works as expected.
Screenshots of the terminal and clipboard history are attached to this issue.
What steps can reproduce the bug?
Steps to Reproduce
- Start Codex CLI in WSL:
```bash
codex --yolo
- In Windows, press
Win + Shift + Sand select an area to capture. - Verify the screenshot is in the Windows clipboard:
- Open Windows clipboard history (
Win + V) and see a preview of the screenshot. - Pasting into another app (e.g. Paint) works.
- Focus the terminal window where Codex is running.
- Try to paste the image into the Codex composer using the configured shortcut
(for me: [Ctrl+Alt+V / Ctrl+V – whichever you actually used]).
- Observe the error messages printed by Codex.
What is the expected behavior?
Expected Behavior
Codex should detect the image in the Windows clipboard and attach it to the current message (or at least acknowledge that
an image was received), without reporting that the clipboard is empty or in an unsupported format.
Additional information
Additional Details
- The problem reproduces consistently.
- The issue occurs even when:
- Codex has just been started.
- Only a single screenshot is in the clipboard.
- MCP startup errors are also shown in the terminal (
jira-pik-remote,github), but they seem unrelated to clipboard
handling.
If you need any extra logs or a special build with more diagnostics, I can help test it.
<img width="1130" height="695" alt="Image" src="https://github.com/user-attachments/assets/ae36da98-889f-4e87-9c34-bff51908328d" />
<img width="1115" height="628" alt="Image" src="https://github.com/user-attachments/assets/ddf53cf5-5d7e-4a55-8735-c03e28124b49" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗