codex - 💡(How to fix) Fix Regression: auto-compacting triggers too late or fails on 5.5 extra high

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…

Automatic context compacting appears to have regressed in Codex. It previously seemed fixed, but it is now failing again at least on the model/mode labeled 5.5 extra high.

The suspected issue is that compaction is being attempted too late, around ~95% context usage, instead of starting earlier with enough reserved budget, for example around ~80%.

Error Message

  • In long-running Codex sessions using 5.5 extra high, compacting does not reliably occur before the session gets critically close to the context limit.
  • When the session is already near the limit, compaction either does not work or does not preserve enough room for a clean continuation.
  • This can interrupt coding tasks and make the agent lose track of unfinished verification/deployment state.

Root Cause

This affects long-running coding workflows because the session can fail or become unreliable exactly when the agent needs to preserve task state across implementation, verification, and follow-up steps.

RAW_BUFFERClick to expand / collapse

Summary

Automatic context compacting appears to have regressed in Codex. It previously seemed fixed, but it is now failing again at least on the model/mode labeled 5.5 extra high.

The suspected issue is that compaction is being attempted too late, around ~95% context usage, instead of starting earlier with enough reserved budget, for example around ~80%.

Observed behavior

  • In long-running Codex sessions using 5.5 extra high, compacting does not reliably occur before the session gets critically close to the context limit.
  • When the session is already near the limit, compaction either does not work or does not preserve enough room for a clean continuation.
  • This can interrupt coding tasks and make the agent lose track of unfinished verification/deployment state.

Expected behavior

  • Codex should proactively compact while there is still enough available context to summarize accurately and continue safely.
  • A threshold closer to ~80% seems safer than waiting until ~95%, especially for high-context modes with large tool outputs.
  • The system should preserve current task state, pending actions, file/repo context, and verification status after compaction.

Scope

  • Confirmed/observed by user on: 5.5 extra high.
  • Unknown whether lower modes or other reasoning settings are affected.

Suggested fix direction

  • Move the automatic compaction trigger earlier, or reserve a larger guaranteed buffer before compaction starts.
  • Consider making the threshold model/mode-specific if extra high consumes context differently.
  • Add telemetry or diagnostics around compaction trigger point, available remaining context, and whether continuation state was preserved successfully.

Impact

This affects long-running coding workflows because the session can fail or become unreliable exactly when the agent needs to preserve task state across implementation, verification, and follow-up steps.

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…

FAQ

Expected behavior

  • Codex should proactively compact while there is still enough available context to summarize accurately and continue safely.
  • A threshold closer to ~80% seems safer than waiting until ~95%, especially for high-context modes with large tool outputs.
  • The system should preserve current task state, pending actions, file/repo context, and verification status after compaction.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING