codex - 💡(How to fix) Fix In conversations with dozens of turns, codex starts to reply to a message but 'forgets' it after the first split [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…
GitHub stats
openai/codex#17522Fetched 2026-04-12 13:27:09
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2

Root Cause

This issue has been present for a while, over many versions of codex. I think at least since gpt-5.3-codex (early Feb). I didn't report it because I thought this is an 'obvious' bug that should be reported by someone else, but found it surprising it's still not fixed.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.17.0-14-generic x86_64 x86_64

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

Gnome Terminal

What issue are you seeing?

In long conversations (this bug always appears when a conversation is sufficiently long in terms of the number of turns, definitely more than 10), sometimes codex starts replying (analyzing, implementing, etc.) in reply to the latest prompt, but after the first "split" (horizontal line, I don't know the proper term for it in codex parlance) it 'forgets' about my latest message and its first-split work and clearly continues to reply to my previous (penultimate) message.

What steps can reproduce the bug?

Seems to be reproducible quite consistently. At least half of long (dozens of turns) conversations. (Maybe even all of them, but I didn't keep the exact tally.)

What is the expected behavior?

No response

Additional information

This issue has been present for a while, over many versions of codex. I think at least since gpt-5.3-codex (early Feb). I didn't report it because I thought this is an 'obvious' bug that should be reported by someone else, but found it surprising it's still not fixed.

extent analysis

TL;DR

The issue can be mitigated by rephrasing or reordering prompts to avoid triggering the bug, although a permanent fix may require updates to the Codex CLI or model.

Guidance

  • Verify that the issue is indeed related to the conversation length and prompt ordering by testing with shorter conversations or reordering the prompts.
  • Try to identify a specific pattern or threshold for when the bug occurs (e.g., exactly after 10 turns) to help with debugging.
  • Consider reporting this issue to the Codex CLI developers or maintainers, as it has been present for multiple versions and may require a code change to fix.
  • If possible, test with a different model version (e.g., gpt-5.3-codex) to see if the issue is specific to the gpt-5.4 model.

Notes

The issue seems to be related to the conversation history and prompt ordering, but without more information about the internal workings of the Codex CLI, it's difficult to provide a more specific fix.

Recommendation

Apply workaround: Rephrase or reorder prompts to avoid triggering the bug, as a permanent fix may require updates to the Codex CLI or model.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING