Context overflow permanently bricks a conversation; /compact and follow-up messages keep failing
Summary
When a Codex conversation reaches the context limit, the conversation becomes permanently unusable. Every subsequent message returns the same context-overflow error, including /compact.
Reproduction
- Use a long-running Codex conversation with tool/search output.
- Continue until Codex reports:
Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
- Send a short follow-up message, such as
繼續. - Try
/compact.
Actual behavior
- The original conversation remains stuck.
- Short follow-up messages still fail with the same context-overflow error.
/compactdoes not recover or compact the conversation.- In one occurrence, the preceding error was also:
stream disconnected before completion: Incomplete response returned, reason: max_output_tokens
- The only practical workaround is abandoning the conversation and starting a new thread.
Expected behavior
After an overflow, Codex should either:
- automatically compact the history before accepting the next message;
- allow
/compactto run against the oversized conversation; or - create a resumable compacted checkpoint/new thread instead of leaving the original thread permanently dead.
Scope / evidence
This has been observed in multiple conversations (three reported by the user; two matching local session records were independently confirmed). A desktop screenshot shows /compact followed by the same context-overflow error. The issue is reproducible at the conversation-recovery layer and is not caused by the new prompt being long.
Environment
- Codex Desktop / VS Code surface
- Observed July 15-18, 2026
- Local LM Studio/OpenClaw context settings were 60K/64K; changing those did not restore the dead Codex conversation.
No private logs or credentials are included.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗