codex - 💡(How to fix) Fix Disappearing chat history (sentences or paragraphs randomly vanishing) [2 comments, 2 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#20303Fetched 2026-04-30 06:30:24
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2renamed ×1
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

codex-cli 0.126.0-alpha.13

What subscription do you have?

Pro

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2

What issue are you seeing?

Basically every session, as new prompts are sent and they flow through, chat history starts disappearing. It disappears in chunks, usually pieces (sentences or paragraphs) of a previous reply or input prompt.

This behavior is incredibly annoying when I'm trying to remember things that have happened, gather historical context, or if I'm in the middle of reading a previous prompt reply while other work is being completed.

I assume this is some form of adaptive compaction/compression that OpenAI does - it's a smart idea if that's the case - however it could be implemented in a way that doesn't affect the user but still works. If you split the actual source of context from the users historical context, we can keep all of the messages without losing the compressed context to be fed back into the LLM on subsequent messages.

What steps can reproduce the bug?

Just use Codex

What is the expected behavior?

Text shouldn't disappear randomly from view.

Additional information

Like I mentioned above, this is likely an adaptive compression/compaction technique OpenAI uses to preserve chat context - it's a smart idea. But the user experience is terrible. The streams should be split:

  • One stream for the users actual visual history in the Codex CLI. This can be what's displayed to users (the chat history), and does not include any live deletions.
  • The compacted version, stored in a separate stream behind the scenes. This can be the source of truth for the Codex CLI for use as context.

This way, it does not affect the user experience, but still benefits from the compaction.

And with all that being said, if it is not actually some compaction technique... Well then this is a bug that I've been experiencing since I've started using Codex, and I'm sure everyone else is experiencing too.

extent analysis

TL;DR

The issue can be addressed by modifying the Codex App to separate the user's visual history from the compacted context used for the LLM, allowing for preservation of chat history without affecting the user experience.

Guidance

  • Investigate the Codex App's implementation of adaptive compression/compaction to understand how it affects the chat history.
  • Consider splitting the chat history into two streams: one for the user's visual history and another for the compacted context used by the LLM.
  • Evaluate the feasibility of storing the compacted version of the chat history separately, without affecting the user's displayed history.
  • Review the Codex App's documentation and configuration options to see if there are any settings that can be adjusted to mitigate this issue.

Example

No code snippet is provided as the issue does not contain sufficient technical details to create a specific example.

Notes

The issue may be specific to the codex-cli 0.126.0-alpha.13 version, and it is unclear if this behavior is intended or a bug. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Modify the Codex App to separate the user's visual history from the compacted context used for the LLM, as this approach addresses the user experience issue while still allowing for the benefits of compaction.

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

codex - 💡(How to fix) Fix Disappearing chat history (sentences or paragraphs randomly vanishing) [2 comments, 2 participants]