Context window is only 275k or something. And honestly compaction is not that bad in Codex. I often don't even notice I went through 5 compactions in a session.
The context window is configurable. I've been using ~600k for months. No, not API pricing, on a Codex sub.
~/.codex/config.toml
model = "gpt-6.1-sol"
model_context_window = 700000
model_auto_compact_token_limit = 630000I don’t usually have a problem doing a complete task in that context size. OMP does make a lot of use of rewind which may be helping - basically forks itself and sends back a summary after a long tangent. Coding tasks use a Luna max agent.
I’ve also found compaction not to be a problem when it does happen.
If it's compacting every 5 mins, you're going to notice it in your cache miss ratio and your costs...
It also presumably means it's regularly not able to get everything it wants to have to make decisions in context, which means it's going to perform poorly...
Same for me, I started wondering if maybe workflows using compaction instead of clear + markdown memory would be more efficient. Writing a plan or tasks to a file often has the next session repeat part of the exploration, compaction seems to keep most relevant context.
Sounds like that's the problem then, 275k is a tiny context window. I regularly have sessions that go to 450k or even up to 700k for an unattended overnight Claude Opus session.
Apparently OpenAI makes you manually setup their 1 Million context window, and it seems to be only documented on X:
https://x.com/thsottiaux/status/2089082893804896524
There's at least a forum thread about it here:
https://community.openai.com/t/why-does-codex-report-a-258-4...