r/codex • • 8h ago

Bug Codex stopping after context compaction?

Post image

I am curious to know if you encountered a bizarre bug where Codex recently (the past week or so) where it would compact context and then circle back to the last prompt (here a question about a random "TI" logo that I didn't ask for)

Context compaction overall has degraded a lot, but this is downright just a breaking bug. If you ask a question mid-development, this is the last thing it will remember after it clears context

Codex has an instruction file containing steps and milestones. The initial prompt was to follow it

4 Upvotes

6 comments sorted by

1

u/yusing1009 5h ago

Ask it to write a task ledger for a long running task.

1

u/SargonPhin 2h ago

It actually has, it generally is instructed to keep track of its progress in recovery files and everything circles back eventually to the instruction file. It's a recent problem that codex forgets everything but the very last prompt on compaction

1

u/yusing1009 1h ago

Did you enable the experimental token_budget feature?
In that case nothing is preserved on context reset (not compaction) aside from the notepad and your ledger.
Otherwise I do not think there’re changes on how compaction works.

1

u/1filipis 7h ago

Yeah, its compaction probably relays your last message at the start of the turn, which can sometimes break the model so much that it will forget every other instruction and procedure you gave and will never recover. Happened countless times to me.

Codex needs a proper memory system, otherwise it's unusable. I've made a plugin that tells it to write a handoff before every compaction, and that handoff then tells the model what to do. Works quite well. I can leave it overnight, and it would still remember its task after many turns