openai / openai/codex

Chats become unusable after context compaction and print internal validation errors

Open
#41,922 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug context session windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

26.825.51511

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.22621.0 x64

What issue are you seeing?

I am experiencing an issue where Codex App chats eventually become unusable when a context compaction occurs.

The problem first appeared around August 27. I was actively using Codex when my Windows PC experienced a BSOD. After restarting the computer, the chat I had been using became affected, and several other existing chats also started showing similar behavior. Not every existing chat was affected at that time.

The issue is now also affecting newly created chats. A new chat initially works normally, sometimes for a considerable amount of time. However, when the conversation reaches the point where Codex attempts to compact the context, the problem appears.

Instead of continuing the conversation normally after context compaction, Codex starts printing what appears to be internal structured data or validation information directly into the chat. The output contains brackets, field names, validation-related text such as "input" and "valid value", and fragments of code or other internal-looking data.

After this happens, sending additional messages does not restore normal behavior and the affected chat becomes effectively unusable.

I am using the latest available version of the Codex App and regularly check the application for updates, but the problem continues to occur.

What steps can reproduce the bug?
  1. Create a new chat in the Codex App.

  2. Use the chat normally and continue the conversation until enough context has accumulated for Codex to perform context compaction.

  3. When context compaction occurs, wait for Codex to continue the conversation.

  4. Instead of returning to normal conversation, the chat starts displaying internal-looking structured or validation data, including brackets, field names, validation-related text such as "input" and "valid value", and fragments of code or structured data.

  5. Send another message in the same chat.

  6. The chat continues exhibiting the same broken behavior and becomes effectively unusable.

The problem originally appeared after my computer experienced a BSOD while Codex was running. However, the issue is no longer limited to chats that existed at the time of the crash. Newly created chats can also develop the same problem once context compaction occurs.

What is the expected behavior?

Context compaction should complete normally and the conversation should remain usable afterward.

After compaction, Codex should continue responding to the user normally while retaining the relevant context needed to continue the session.

Internal validation information, structured error data, implementation details, or code related to the compaction process should not be printed directly into the conversation.

The chat should remain functional after context compaction.

Additional information

The issue first appeared around August 27 after my Windows PC experienced a BSOD while I was actively using the Codex App.

After restarting the computer, the chat that was active during the crash exhibited the problem. Several other existing chats also developed similar symptoms, although some chats remained functional.

Since then, I have confirmed that the issue is not limited to conversations that existed at the time of the BSOD. Newly created conversations initially work normally but can eventually develop the same problem when context compaction occurs.

I keep the Codex App updated and check for updates manually every day. I am currently running version 26.825.51511, and the problem continues to occur despite keeping the app fully up to date.

Before opening this report, I searched the GitHub repository for existing open issues describing similar symptoms. I commented on the relevant open issues I found. In one of those issues, I was informed that the previously reported problem had been fixed a few months ago and that, if similar symptoms were still occurring on the latest version, I should open a new bug report. That issue was then closed.

I am therefore opening this new report because I am still experiencing the problem on the current version of the Codex App.

@etraut-openai asked me to open this issue on #27269, #27555 and #27511.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Reproduce the failure in the Codex App on Windows by continuing a new chat until context compaction, then inspect the compaction path and its resulting output; done means the chat remains usable and does not display internal validation or structured data after compaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.