TUI: Support pasting images directly from the system clipboard on Windows
What variant of Codex are you using?
CLI
What feature would you like to see?
Feature request
Please add support for pasting images directly from the system clipboard into the Codex TUI on Windows.
### Current behavior
Codex supports image input through the --image (-i) option, but an image copied to the Windows clipboard cannot be pasted directly into the TUI prompt.
Users currently need to:
- Save the clipboard image to a file.
- Start Codex with
codex -i <image-file>, or provide the saved file path afterward.
This interrupts the workflow, especially when sharing screenshots, error dialogs, UI states, and terminal captures.
Other terminal-based AI clients, such as Hermes, can detect an image in the clipboard and attach it directly to the prompt.
### Expected behavior
When the clipboard contains an image, pressing Ctrl+V in the Codex TUI should:
- Detect the clipboard image, such as PNG, DIB, or bitmap data.
- Convert it to a supported image format if necessary.
- Attach it to the current prompt.
- Display a placeholder or preview such as
[Image #1]. - Allow the user to remove the attachment before submitting.
Normal text clipboard behavior should remain unchanged.
### Suggested implementation
On Windows, the TUI could read image data using the native clipboard APIs and convert formats such as CF_DIB or CF_BITMAP to a temporary PNG attachment.
Ideally, equivalent behavior could also be supported on macOS and Linux.
### Environment
- OS: Windows
- Shell: PowerShell
- Codex CLI version:
0.150.1 - Image input through
codex -i <file>works - Direct clipboard image paste does not work
### Why this matters
Screenshots are commonly used when debugging UI problems, runtime errors, configuration screens, and visual regressions. Direct clipboard image paste would make multimodal
workflows in the Codex TUI significantly faster and more natural.
Additional information
_No response_