Hi everyone,
I would like to report an issue I experienced with Codex yesterday and overnight.
Yesterday, I asked Codex to make a relatively small change to an existing project. Instead of completing the change, Codex apparently entered a continuously repeating loop.
For hours, the pattern looked roughly like this:
-
Codex stated that it was going to make certain changes or fixes.
-
This was followed by context compaction.
-
After the compaction, Codex again explained what it was going to change.
-
Another context compaction occurred.
-
Then essentially the same process started again.
What made this particularly noticeable was that Codex sometimes brought previously completed issues and changes back into the workflow. It appeared to lose track of the actual project state and repeatedly reconsider or redo work that had already been completed.
When I checked this morning, Codex had apparently spent around 9 hours running in this loop.
The bigger problem is that during this time my available weekly usage went from 100% to 0%, while the original task was still not completed.
It looks as if the combination of repeated context compactions and a long-running agent task may have caused Codex to lose track of its current progress, resulting in the same steps being planned or performed repeatedly.
This is especially problematic because such a loop can apparently continue for many hours and consume the entire available usage allowance without actually completing the requested task.
I think it would be useful for Codex to have additional safeguards for situations like this, for example:
-
Detecting when the same tasks or steps are being repeated multiple times.
-
Stopping or asking the user for confirmation when no meaningful progress has been made for an extended period.
-
Better preservation of task and project state across context compactions.
-
A warning when an unusually large amount of usage is being consumed by a single task.
-
Automatic termination of obviously repetitive agent loops.
Has anyone else experienced similar behavior, especially during long-running Codex sessions involving multiple context compactions?

