Support pasting images directly into Codex CLI
What version of Codex CLI is running?
0.122.0
What subscription do you have?
Codex CLI does not currently support directly pasting images from the clipboard into a session. This makes workflows like frontend debugging, extension development, and DevTools troubleshooting slower than they should be.
Which model were you using?
_No response_
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
no
What steps can reproduce the bug?
this is not a bug
What is the expected behavior?
_No response_
Additional information
Problem
The model can analyze images, but the CLI input layer only reliably accepts text and file paths.
A common workflow should be:
- Take a screenshot
- Paste it into the CLI
- Let the model inspect it immediately
Right now, users have to manually find the local file path or rewrite the screenshot contents as text.
## Expected behavior
Support direct clipboard image paste in Codex CLI.
Ideal behavior:
- detect pasted image content from clipboard
- attach it to the current session automatically
- allow the model to inspect it immediately
## Minimum acceptable fallback
If direct paste is not yet possible, a lower-friction fallback would still help:
- command to attach the current clipboard image
- automatic temp-file creation from clipboard image
- simpler image attachment flow than manually typing a local path
## Why this matters
This is especially important for:
- frontend debugging
- browser extension development
- console error screenshots
- network panel screenshots
- visual regression review
- UI troubleshooting
## Clarification
This is not mainly a model limitation. The model can inspect images when provided.
The issue is the CLI attachment/input experience.
## Request
Please add first-class image input support to Codex CLI, including:
- direct clipboard image paste
- image attachment handling in-session
- support for multiple images
- temp-file fallback when needed
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This should already work, but there are known issues with certain terminals and platforms. Which terminal emulator are you using, and which platform?
In some terminals you paste text with ctrl+shift+v but codex still want ctrl+v for the image.
Hope that helps.
Second this. I use Warp and it's not supported
Reproduced on the latest CLI build available on my machine, with a concrete macOS/Warp data point.
Environment:
codex-cli 0.132.0TERM=xterm-256colorObserved behavior:
-i/--image <FILE>works, but that is a much slower workflow for screenshot-heavy review/debug tasks.Expected:
This is a high-friction gap for screenshot-based debugging and visual review workflows.
Direct paste matters, but for iterative frontend work there's a second cost: every paste re-sends the full PNG, so on a "tweak, screenshot, paste, tweak again" loop the same UI eats vision tokens per turn (~5-10k each). A useful adjacent path is letting the agent attach a structured representation of the screenshot once (bboxes, hex colors, OCR text, optional intent enum), then iterate on JSON deltas instead of re-pasting pixels. Doesn't replace the paste request, complements it. Open MIT schema if useful: github.com/bickov/slimsnap-schema
I looked into this and have a small reference fix here:
https://github.com/thewh1teagle/codex/tree/fix/image-filename-clipboard-paste
Root cause: when an image file is copied and pasted into the TUI, some terminals paste only the basename, e.g.
screenshot.png, rather than the full local path. Codex then treats that as normal text because it cannot read the basename as a path.Proposed fix: when pasted text looks like an image filename but is not readable as a path, check the clipboard file list. If it contains a readable image file with the same filename, resolve the full path and attach it through the existing local image attachment flow. The composer then inserts
[Image #N]instead of plain filename text.Validation:
just fmtjust test -p codex-tui clipboard_pastegit diff --checkI could not open a PR because external PRs are restricted, but I’m happy to open one if the team wants to invite this change.