Bug: TUI drops MCP image output when text precedes image
What Version Of Codex Is Running?
codex-cli 0.89.0
What Subscription Do You Have?
Pro
Which Model Were You Using?
5.2-Codex (MCP tool output ordering)
What Platform Is Your Computer?
Mac Mini M4 - Darwin 25.3.0 arm64 arm
What Terminal Emulator And Version Are You Using (If Applicable)?
Terminal.app 466 (TERM_PROGRAM=Apple_Terminal), shell: /bin/zsh, TERM=xterm-256color
What Issue Are You Seeing?
The TUI only renders an MCP image output cell when the first CallToolResult.content block is an image; image blocks after text are ignored. Users see a caption/placeholder without the image output cell, which hides tool output.
What Steps Can Reproduce The Bug?
- Run Codex TUI 0.89.0 (
rust-v0.89.0tag). - Trigger an MCP
CallToolResultwherecontenthas a text block followed by an image block (caption then image). - Observe the history view.
Example generator:
- Local repro via a temporary MCP tool or injected events; can share steps on request.
What Is The Expected Behavior?
The TUI renders an image output cell whenever any image block exists, regardless of ordering.
Before/After
Before
<img width="713" height="630" alt="Image" src="https://github.com/user-attachments/assets/6a2a673b-de41-4a8b-8f55-a704b25753e3" />
After Fix #9815
<img width="976" height="899" alt="Image" src="https://github.com/user-attachments/assets/05e82217-8ea5-471e-94b1-ccf4a75f2bd9" />