You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codex just compacts repeatedly for hours at a time before it is able to make a change #14120
What terminal emulator and version are you using (if applicable)?
ghostty
What issue are you seeing?
each compaction leaves codex with only like 12% context remaining, and so it is impossible to actually do anything. I'm like "great, can you make the change per the spec and discussion" and then it compacts from 10% to 15%, reads a few files, compacts from 5% to 12%, reads a few files, compacts, reads a few files, compacts, etc.
it has done this about 6 times in a row, and it has not been able to patch a single file yet after around 2 hours, and I bet its understanding of the change I want is degrading due to game of telephone.
this is completely unusable and I did not see the issue on older versions like 0.109 IIRC
What steps can reproduce the bug?
run a session with a bunch of docs and files touched. not really a large change, affecting less than 30 files and 10 docs.
What is the expected behavior?
for the /compact feature to actually /compact context to some reasonable extent, or to overall design the product in a way that makes it possible for the agent to edit code without just sitting there compacting repeatedly for hours.
I switched to reasoning effort high instead of xhigh - so far it's working and didn't get stuck
I reverted to 5.3 and set it to HIGH, and now when I compact it ACTUALLY compacts.
(I hope this will help devs to find the problem and users to get around it!)
@jamesheinlein@ohad7@mercmobily I found that manually stopping all “Codex Helper” processes in Activity Monitor stops Codex from getting stuck while auto-compacting, and then just prompting it with “continue” fixes it for me. Hope this helps!
Reacted by Pieter Hamman, ballplayajd, Mason Liu, SugarMGP and Xiang Liu
@CatnyapC Wait I am using codex-cli, I've never used the web version... is there an "activity monitor" in codex-cli too?
My bad, I assumed you were using the new Codex App. I didn’t realize the CLI version had this auto-compacting issue too, thought it was only an app-side problem, since the app has been pretty bumpy since launch.
But with how unstable auto-compacting is right now, I think the app version is still worth using, since at least there’s something you can do about it when it's stuck compacting in a loop.
I just downloaded Codex and am facing this issue - as soon as my session hits 258k context I literally cannot proceed, it just gets stuck on 'compacting' and then fails repeatedly
Facing a similar issue - frequent context compacting, despite only 27-30% context usage. Codex is extremely slow at completing work due to this issue. Also happens when I open a new session.
In my Codex session, it keeps reading the same files over and over, and just when it seems like it’s finally about to move on to the next task, it gets compacted again and stops.
Activity
github-actions commentedon Mar 9, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
ohad7 commentedon Mar 11, 2026
seeing the same behavior. any workaround?
mercmobily commentedon Mar 11, 2026
This is a real problem for me now
ohad7 commentedon Mar 11, 2026
I switched to reasoning effort high instead of xhigh - so far it's working and didn't get stuck
mercmobily commentedon Mar 11, 2026
I reverted to 5.3 and set it to HIGH, and now when I compact it ACTUALLY compacts.
(I hope this will help devs to find the problem and users to get around it!)
mercmobily commentedon Mar 11, 2026
I just realised I used 80% of my quota re-compacting repeatedly... ugh! Watch out people.
apollostreetcompany commentedon Mar 11, 2026
they know it's an issue.
adrianabelarde commentedon Mar 11, 2026
seems a bit fast now after changing it from xhigh to high
CatnyapC commentedon Mar 11, 2026
@jamesheinlein @ohad7 @mercmobily I found that manually stopping all “Codex Helper” processes in Activity Monitor stops Codex from getting stuck while auto-compacting, and then just prompting it with “continue” fixes it for me. Hope this helps!
mercmobily commentedon Mar 11, 2026
@CatnyapC Wait I am using codex-cli, I've never used the web version... is there an "activity monitor" in codex-cli too?
martindrapeau commentedon Mar 12, 2026
No, Activity Monitor on MacOS (equivalent to Task Manager in Windows),
CatnyapC commentedon Mar 12, 2026
My bad, I assumed you were using the new Codex App. I didn’t realize the CLI version had this auto-compacting issue too, thought it was only an app-side problem, since the app has been pretty bumpy since launch.
But with how unstable auto-compacting is right now, I think the app version is still worth using, since at least there’s something you can do about it when it's stuck compacting in a loop.
ohad7 commentedon Mar 14, 2026
i don't experience this bug any more, Been running two days with xhigh codex app, no death spiral. I think it can be closed.
etraut-openai commentedon Mar 14, 2026
We deployed a fix for this. It was a server-side issue. Thanks everyone who reported this problem.
C-o-d-e-C-o-w-b-o-y commentedon May 16, 2026
I just downloaded Codex and am facing this issue - as soon as my session hits 258k context I literally cannot proceed, it just gets stuck on 'compacting' and then fails repeatedly
kushalj1997 commentedon May 26, 2026
Facing a similar issue - frequent context compacting, despite only 27-30% context usage. Codex is extremely slow at completing work due to this issue. Also happens when I open a new session.
jaylex32 commentedon Jun 5, 2026
I'm having this issue compacting after compacting without doing any work and then it wastes all my tokens, that should be reimburse.
umizame commentedon Jul 2, 2026
In my Codex session, it keeps reading the same files over and over, and just when it seems like it’s finally about to move on to the next task, it gets compacted again and stops.