Codex App entered an infinite auto-compaction loop and consumed ~30% of my usage limit
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.141536
What subscription do you have?
Pro X20
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What issue are you seeing?
The Codex App got stuck in what appears to be an infinite auto-compaction loop.
I started a Codex chat to fix a frontend bug. After some time, the app began repeatedly sending 2–4 similar assistant messages, then showing “Context compacted automatically”, and then continuing the same cycle again.
This continued for around 3 hours without making real progress or stopping by itself. During that period, my usage limit was reduced by approximately 30%.
From the screenshot, the repeated pattern was:
- The assistant generated a few messages saying it would fix/inspect the avatar fallback issue.
- The context was automatically compacted.
- The assistant repeated a very similar plan again.
- Another automatic compaction happened.
- The loop continued indefinitely.
The app did not clearly stop, ask for confirmation, or detect that it was repeating itself. It looked like the agent kept re-entering the same reasoning/action cycle after each compaction.
<img width="1241" height="988" alt="Image" src="https://github.com/user-attachments/assets/e1ef0fc8-0489-42af-b3f4-6885715f0211" />
What steps can reproduce the bug?
Feedback ID: 019f0d51-4c65-7451-a2b2-430b8ce0bc2a
What is the expected behavior?
The Codex App should detect this kind of repeated compaction/retry loop and stop automatically, or ask the user for confirmation before continuing.
It should not keep consuming usage indefinitely when it is repeating the same action plan without meaningful progress.
Additional information
I attached screenshots showing the repeated “Context compacted automatically” messages and the loop pattern.
The issue may be related to the agent losing state after compaction and restarting the same plan repeatedly.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I have the exact same issue; Codex ruined a session I had been working on for 1 month, consuming my 2 resets and 50% of the weekly before I understood it's a bug. But there is no solution other than starting a new session with 0 context.
It's been 3 days I reported it and they still didnt refund my resets or usage user-ARpTy5d0ZgjgKzFSwRc4h0wB
https://github.com/openai/codex/issues/31033
Still no news, usage gone, resets gone, 5.6 sol out and we wasted all resets on a bug
the same issue
Feedback ID : 019f547c-9ab9-7ca0-8b66-b0742598635d
<img width="1482" height="1410" alt="Image" src="https://github.com/user-attachments/assets/97f729f9-6bf8-4d27-9dbb-a3fa1f4e6e73" />
and there is no compensation; this issue is here even before 5.6 Sol.
I wasted my resets on a stupid bug, problem is you leave it afk and it empties your 5hr and weekly
i am facing the same issue, now i used back chatgpt to tackle the problem.