CLI output & thinking order error, out of sequence & disordered

Resolved 💬 5 comments Opened Apr 20, 2026 by danche354 Closed Apr 22, 2026

What version of Codex CLI is running?

codex-cli 0.121.0

What subscription do you have?

custom

Which model were you using?

gpt5.4

What platform is your computer?

Darwin 25.3.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iterm2

What issue are you seeing?

The output and thinking content are interleaved.Is this incompatible with iTerm?As shown in the screenshot, it displays as output1 → thinking → output2.Moreover, output1 and output2 often contain large duplicate sections, as if the streaming output stream is messed up.

<img width="3264" height="890" alt="Image" src="https://github.com/user-attachments/assets/06158f39-b5ae-4437-adf5-51ca96863006" />
sometimes the tokens output as following, ‘AB’ is repeated

---
A
B
thinking
A
B
C

What steps can reproduce the bug?

just ask any question

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗