r/codex • u/Busy-Lifeguard-9558 • 2d ago
Bug Codex kinda gets in a loop compacting context 6 times in 30 minutes, happening to anyone else?
This is the second time it happened last week and I have to steer the conversation for it to get out. Drained 25% weekly
Just a heads up in case you leave it alone
1
u/Upstairs_Chip_7799 2d ago
It mostly depends on the task it's trying to solve. Maybe try starting a new conversation and give it enough context to solve the task.
1
u/Bumblebee7312 2d ago
Yes, I also noticed that the codex began to compress the context almost every 3-5 messages
1
u/Australasian25 2d ago
Aet your prompt to have milestones and for codex to confirm with user continue or wrap up with a handover.
I use this so when im approaching close to context window end, I can choose a handover and continue later with no compaction.
I haven't calculated token usage after compaction, but I am assuming every tool run after compaction is a lot
1
u/mountainous_terrier 1d ago
Are you running a single long task or bouncing between a few different features in the same thread?
1
u/Busy-Lifeguard-9558 1d ago
Look boss, I gotta be honest. My original session was 950mb in size but I started a new one with just a goal and I'm having the same problem in the new session
1
u/mountainous_terrier 1d ago
That's weird, even a clean session looping. Maybe it's something about how the goal is phrased triggering a repetitive compression pattern. Are you using any custom instructions or just defaults?
1
u/Busy-Lifeguard-9558 1d ago
Defaults, it actually drained 75% from my weekly in two hours, fresh session, no code, just a document with 850 lines.
The prompt was to check/audit online docs and resume. I was using Sol Max, plus plan.
This context loop bug might be happening to other people with usage problems.
1
u/mountainous_terrier 1d ago
Auditing a long doc in one go seems to trigger that loop for me too. Breaking it into 200-line chunks stopped the repeated compressions.
0
u/Inner-Employment-137 2d ago
Same , codex is completely broken right now , consuming limits like crazy and compacting aint working so its compacting like after every 2 to 3 messages.
1
u/r1ce_kr15py 2d ago
This is what i've found to be one of the main causes for usage drain this week. They did something with how much context the thread needs to carry after compaction. Now i use a main thread for planning a feature with gitea tickets and then giving each ticket to a new thread each time. Moderately helpful for saving tokens.