[Context] Repeated auto-compaction degrades execution frontier and prevents convergence in long tasks
Description
In a long-running Codex Desktop task, automatic context compaction repeatedly preserved the broad objective but degraded the execution frontier: what was already complete, what remained, and the exact next action.
This was not a literal hard-amnesia reset. After compaction, the agent still referenced specific prior findings and files. The failure was loss of convergence: after many compactions it repeatedly announced variations of "finish the last items, run staged verification, then commit", reopened or rediscovered additional work, and did not reach the promised terminal state.
The original version of this report attributed the behavior directly to Ultra reasoning and claimed that only the base user prompt survived. The local rollout evidence does not support those stronger claims, so this report has been corrected to describe the observed behavior.
Environment
- Product: Codex Desktop
- Windows app version:
26.715.31925 - Bundled Codex/app-server version recorded in the rollout:
0.144.5 - Client/host topology: Windows client connected to a remote Ubuntu workspace
- Model:
gpt-5.6-sol - Reasoning effort:
highthrough2026-07-18T19:59:57Z- switched to
ultraat2026-07-18T20:02:30Z - Thread/session ID:
019f74ea-cacf-7c91-81b7-2d1502414f94 - Reported model context window:
258,400tokens - No persisted
/goalwas active for this thread.
Observed compaction timeline (UTC)
The rollout contains 24 compacted events between 2026-07-18T11:28:57Z and 2026-07-19T01:30:02Z.
The nearest preceding token-count samples were approximately 196,548–218,387 input tokens against the reported 258,400-token context window.
| # | Timestamp (UTC) | Reasoning effort | Nearest preceding input tokens |
|---:|---|---|---:|
| 1 | 2026-07-18T11:28:57.728Z | high | 218,387 |
| 2 | 2026-07-18T13:47:52.139Z | high | 204,127 |
| 3 | 2026-07-18T14:20:15.106Z | high | 208,481 |
| 4 | 2026-07-18T14:52:24.390Z | high | 216,276 |
| 5 | 2026-07-18T15:59:35.164Z | high | 208,546 |
| 6 | 2026-07-18T17:05:31.396Z | high | 214,973 |
| 7 | 2026-07-18T17:40:13.392Z | high | 208,926 |
| 8 | 2026-07-18T18:15:05.095Z | high | 209,486 |
| 9 | 2026-07-18T18:35:05.715Z | high | 213,696 |
| 10 | 2026-07-18T19:05:01.808Z | high | 209,219 |
| 11 | 2026-07-18T19:24:30.682Z | high | 210,305 |
| 12 | 2026-07-18T19:59:57.049Z | high | 202,861 |
| 13 | 2026-07-18T20:17:51.571Z | ultra | 208,630 |
| 14 | 2026-07-18T20:58:19.400Z | ultra | 196,548 |
| 15 | 2026-07-18T21:25:02.192Z | ultra | 203,493 |
| 16 | 2026-07-18T21:50:59.897Z | ultra | 207,961 |
| 17 | 2026-07-18T22:22:22.813Z | ultra | 200,071 |
| 18 | 2026-07-18T22:52:35.568Z | ultra | 198,649 |
| 19 | 2026-07-18T23:11:28.513Z | ultra | 206,130 |
| 20 | 2026-07-18T23:46:11.890Z | ultra | 202,179 |
| 21 | 2026-07-19T00:15:34.308Z | ultra | 200,672 |
| 22 | 2026-07-19T00:38:20.535Z | ultra | 200,405 |
| 23 | 2026-07-19T01:01:11.126Z | ultra | 200,087 |
| 24 | 2026-07-19T01:30:02.695Z | ultra | 203,966 |
There were 12 compactions before Ultra and 12 after switching to Ultra. The 12 Ultra events span about 5 hours 12 minutes, with most adjacent events roughly 19–40 minutes apart. This makes Ultra an important affected configuration, but the trace does not establish that Ultra alone causes the bug.
Concrete convergence failure
During the Ultra phase, the post-compaction status repeatedly returned to the same high-level frontier:
- finish the remaining small set of issues;
- build an exact staged snapshot;
- run hostile/targeted verification;
- create a local commit.
This pattern recurred after compactions 13–24 while new "last" issues kept being rediscovered and the terminal state was not reached.
At 2026-07-19T01:10:00Z, the user explicitly asked whether the agent had become stuck due to compaction cycles. After compaction #24 at 2026-07-19T01:30:02.695Z, the agent again denied looping and restated essentially the same remaining frontier: two final items, staged verification, then a local commit.
The retained replacement history was not empty: it contained multiple user/developer messages plus an encrypted compaction item. That is why this issue is framed as frontier degradation / failure to converge, not complete loss of all context.
Expected behavior
After compaction, Codex should preserve a compact but explicit execution checkpoint:
- active objective and constraints;
- completed actions and evidence;
- unresolved items;
- exact next action;
- terminal condition;
- explicit "do not repeat" boundaries.
The next model turn should reconcile against that checkpoint and continue from the first unfinished item without re-announcing or reopening completed work.
Actual behavior
The broad objective survives, but the post-compaction model repeatedly reconstructs the work at too high a level. It remembers facts while losing enough completion state to reopen the audit and postpone its terminal step across many consecutive compactions.
Impact
- Multi-hour non-converging runs.
- Rapid consumption of included Codex allowance and/or purchased credits.
- Duplicate investigation, verification, and potentially mutations.
- Reduced trust in long autonomous tasks even when individual post-compaction messages appear locally coherent.
Reproduction
- Start a long multi-stage Codex Desktop task with explicit completion criteria.
- Let it run until several automatic
context_compactedevents occur. - Record the last pre-compaction plan/checkpoint.
- Compare it with the first post-compaction status and actions.
- Repeat across several compactions.
- Observe whether Codex repeatedly returns to a previously announced "last steps" frontier instead of reaching the terminal condition.
Relationship to #32922
#32922 reports persisted goal context being discarded by compaction. This reproducer did not have an active persisted /goal, and the overall objective remained available. The observed failure is narrower/different: completed-vs-pending execution state degraded enough to prevent convergence while many detailed facts still survived.
The issues may share a compaction-retention boundary, but this is not proven to be the same root cause.
In-product feedback correlation
This incident was also submitted through Codex in-product /feedback from the affected ChatGPT account, with logs attached.
- Feedback reference / affected thread ID:
019f74ea-cacf-7c91-81b7-2d1502414f94 - GitHub reporter: @Leviann
The in-product submission should provide OpenAI with the private account and diagnostic metadata needed to correlate this public report without publishing the account email here.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗