codex - 💡(How to fix) Fix Image paste only works after pasting text first on Linux/X11

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

debugging, frontend review, terminal error screenshots, and visual regression

Fix Action

Workaround

Paste a short text string first, then copy and paste the image again. Alternatively, save the image as a file and pass it with codex -i /path/to/image.png.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.132.0

Install method

Global npm package: @openai/codex

Platform

  • OS/session: Deepin desktop, X11
  • Terminal: reproduced in multiple terminal emulators, including JetBrains-JediTerm
  • Shell: bash
  • TERM=xterm-256color
  • Locale: zh_CN.UTF-8
  • Input method environment:
    • GTK_IM_MODULE=fcitx
    • QT_IM_MODULE=fcitx
    • XMODIFIERS=@im=fcitx

Problem summary

Image paste does not work immediately after starting a Codex CLI interactive session. This is not limited to JetBrains-JediTerm; the same behavior is observed across multiple terminal emulators on the same Linux/X11 desktop environment.

However, if I paste any text string first, then copy an image and paste it into the same session, the image paste succeeds.

This looks like a TUI input or Linux/X11 clipboard/paste-channel initialization issue: the first text paste appears to change the session state so that subsequent image paste events are recognized.

Steps to reproduce

  1. Start a new interactive codex session.
  2. Copy an image to the system clipboard.
  3. Paste into the Codex CLI input area with Ctrl+V or terminal paste.
  4. Observe that no image is attached.
  5. Copy and paste any plain text string into the Codex CLI input area.
  6. Copy an image to the system clipboard again.
  7. Paste into the same Codex CLI session.
  8. Observe that the image is now attached successfully.

Expected behavior

The first direct image paste should be recognized and attached without requiring an earlier text paste.

Actual behavior

The first image paste is ignored or not attached. Image paste starts working only after a text paste has happened in the session.

Impact

This adds friction to workflows that depend on screenshots, including UI debugging, frontend review, terminal error screenshots, and visual regression investigation.

Related issues

Workaround

Paste a short text string first, then copy and paste the image again. Alternatively, save the image as a file and pass it with codex -i /path/to/image.png.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The first direct image paste should be recognized and attached without requiring an earlier text paste.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING