Image paste only works after pasting text first on Linux/X11
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=fcitxQT_IM_MODULE=fcitxXMODIFIERS=@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
- Start a new interactive
codexsession. - Copy an image to the system clipboard.
- Paste into the Codex CLI input area with
Ctrl+Vor terminal paste. - Observe that no image is attached.
- Copy and paste any plain text string into the Codex CLI input area.
- Copy an image to the system clipboard again.
- Paste into the same Codex CLI session.
- 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
- https://github.com/openai/codex/issues/18645
- https://github.com/openai/codex/issues/23611
- https://github.com/openai/codex/issues/19143
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.