Hacker News new | ask | show | jobs
by jubilanti 9 days ago
The fact there is no way to disable auto-compaction and no way to go back in the conversation history to before a compact makes codex a no-go for me on any codebase > 5kloc. Even worse it seems to fire randomly at 10-20% of context left. So really you have 80% of 272k as real usable context. Compaction kills my sessions, it hallucinates and is worse than starting fresh. I've had enough times screaming at my computer when it burns tokens on a large codebase, gets to 15%, auto-compacts, and hallucinates so bad it has to read the entire codebase agin, gets to 15%, auto-compacts....
3 comments

Have you tried using another harness like Pi? You can easily turn off auto compaction and if you leave it on you can use /tree to go back before the compaction if you like.
> you can use /tree to go back before the compaction

This is really a killer feature in my opinion. I'm currently working on pi brains extension that is designed to solve the compaction issue I have, which is, I don't know what the AI knows after compaction.

https://gitsense.com/screenshots/pi-inspect-overview.png

The screenshot shot above contains what I call a compaction capsule which contains all the messages/events at the point of compaction. The "Files" section in the right side panel shows me how many files were read/modified since compaction.

After compacting, I can easily tell what Pi use to know and use `/tree` to go back in time.

I still wouldn't compact more than 5 times before starting a new session since compaction messages persists in Pi.

You also might like https://github.com/nicobailon/pi-boomerang that lets you effectively do some work, compact that section with a summary and continue on.
> The fact there is no way to disable auto-compaction and no way to go back in the conversation history to before a compact makes codex a no-go for me

Same. I've told @tibo many times about these issues but apparently OpenAI's focus is on features that buy them the most users ASAP instead of increasing harness quality.

So the practical workaround is to set model_auto_compact_token_limit very near, but still below, the model’s context window. This postpones compaction rather than disabling it.

config.toml

  model_context_window = 27000
  model_auto_compact_token_limit = 17000
  model_auto_compact_token_limit_scope = "total"