Codex CLI fails to paste valid CF_DIB/CF_DIBV5 images from the Windows clipboard
What version of Codex CLI is running?
codex-cli 0.144.3
What subscription do you have?
ChatGPT Pro
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64 (Windows 10 Pro, 64-bit, zh-CN)
What terminal emulator and version are you using (if applicable)?
Windows Terminal 1.24.2604.2001 with PowerShell 7.6.1
Codex doctor report
Codex Doctor v0.144.3 · windows-x86_64
Environment:
- OS: Windows 10.0.19045 (Windows 10 Pro, 64-bit, zh-CN)
- Runtime: npm, windows-x86_64
- Terminal: Windows Terminal
- Installation: consistent
- State databases: healthy
Configuration:
- Authentication: ChatGPT
- Model provider: OpenAI
- Model: gpt-5.6-sol
- Configuration loaded successfully
Updates:
- Installed version: 0.144.3
- Latest version: 0.144.3
Connectivity:
- No proxy environment variables
- WebSocket connection succeeded
- Provider endpoints reachable
Doctor result:
17 ok | 1 idle | 1 note | 0 warnings | 0 failures
What issue are you seeing?
Codex CLI cannot paste an image from the Windows clipboard using Alt+V, even though the clipboard contains
valid standard Windows image data and Windows applications can decode it successfully.
Codex displays the following error:
Failed to paste image: no image on clipboard: The image or the text that was about the be transferred to/from
the clipboard could not be converted to the appropriate format.
The screenshot was captured using PixPin 3.3.5.7. PixPin was configured to copy standard image data rather
than an image file reference.
I inspected the clipboard using System.Windows.Forms. Windows reports that it contains an image:
ContainsImage : True
ContainsFileDropList : False
ContainsText : False
Formats : PixPinData, DeviceIndependentBitmap, Format17
Format17 corresponds to CF_DIBV5. The image can also be decoded successfully through
System.Windows.Forms.Clipboard.GetImage():
Width : 356
Height : 266
PixelFormat : Format32bppRgb
The exact same clipboard image can be pasted successfully into Claude CLI and other Windows applications. The
failure appears to be specific to the Windows clipboard image decoding path in Codex CLI.
What steps can reproduce the bug?
- Install the latest Codex CLI through npm:
npm install -g @openai/codex
- Confirm the version:
codex --version
Result: codex-cli 0.144.3
- Run Codex natively on Windows 10 using Windows Terminal and PowerShell 7.6.1.
- Use PixPin 3.3.5.7 to capture a screenshot.
- In PixPin, configure:
Settings > System > Clipboard > Copy image as file > Disabled
This causes PixPin to place standard image data in the clipboard rather than a file reference.
- Verify that Windows recognizes the clipboard image. In my case, the clipboard exposes:
- DeviceIndependentBitmap (CF_DIB)
- Format17 (CF_DIBV5)
- ContainsImage = True
- Focus the Codex CLI prompt and press Alt+V.
- Codex reports:
Failed to paste image: no image on clipboard: The image or the text that was about the be transferred to/
from the clipboard could not be converted to the appropriate format.
- Paste the same clipboard content into Claude CLI or another Windows application. It works correctly.
The problem reproduces consistently.
What is the expected behavior?
Codex CLI should recognize the CF_DIB or CF_DIBV5 image available in the Windows clipboard and attach it to
the current prompt when Alt+V is pressed.
At minimum, Codex should support standard image clipboard formats that
System.Windows.Forms.Clipboard.ContainsImage() and Clipboard.GetImage() can read successfully.
Additional information
Screenshot application:
- PixPin 3.3.5.7
Codex installation:
- Installed through npm
- Native Windows x64 executable
- Not running inside WSL
- Version 0.144.3, which is the latest npm version at the time of reporting
The issue persisted after:
- Upgrading PixPin from version 1.5.0.0 to 3.3.5.7
- Configuring PixPin to copy standard image data instead of an image file
- Restarting PixPin
- Confirming that the clipboard contains valid CF_DIB and CF_DIBV5 data
- Confirming that Windows can decode the image successfully
The same clipboard image works in Claude CLI, suggesting that this is not an empty or invalid clipboard but a
clipboard-format compatibility issue in Codex CLI.
Possibly related:
https://github.com/openai/codex/issues/15612
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗