Support pasting images directly into Codex CLI

Open 💬 7 comments Opened Apr 23, 2026 by CookGuo
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

  1. Take a screenshot
  2. Paste it into the CLI
  3. 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

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #18645
  • #17502

Powered by Codex Action

etraut-openai contributor · 2 months ago

This should already work, but there are known issues with certain terminals and platforms. Which terminal emulator are you using, and which platform?

dal00 · 2 months ago

In some terminals you paste text with ctrl+shift+v but codex still want ctrl+v for the image.

Hope that helps.

Fogggy-Chao · 2 months ago

Second this. I use Warp and it's not supported

AustinWp · 2 months ago

Reproduced on the latest CLI build available on my machine, with a concrete macOS/Warp data point.

Environment:

  • Codex CLI: codex-cli 0.132.0
  • Platform: macOS 26.5, build 25F71
  • Terminal: WarpTerminal v0.2026.05.18.05.32.stable_02
  • TERM=xterm-256color

Observed behavior:

  • In the Codex CLI TUI, pasting a screenshot/image from the clipboard does not attach the image.
  • Passing an image file explicitly with -i/--image <FILE> works, but that is a much slower workflow for screenshot-heavy review/debug tasks.
  • This is especially noticeable because Claude Code supports direct clipboard image paste in the terminal workflow.

Expected:

  • Clipboard image paste should work reliably in the CLI TUI on macOS/Warp, or the TUI should clearly document/show a supported shortcut/workaround for this terminal.
  • Ideally Codex should handle the clipboard image by saving it to a temporary file and attaching it automatically, matching the direct-paste UX users expect from similar coding CLIs.

This is a high-friction gap for screenshot-based debugging and visual review workflows.

bickov · 1 month ago

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

thewh1teagle · 16 days ago

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 fmt
  • just test -p codex-tui clipboard_paste
  • git diff --check

I 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.