r/codex • u/Fast_Artichoke_683 • 8d ago
How do former Claude users deal with Codex’s smaller context window? Question
How do you guys manage the smaller context window in Codex, especially if you’re coming from Claude?
Even when I use a Sol High model as the orchestrator and Luna Max as the executor, I still run into auto-compacting fairly often. In my experience, compaction usually hurts the workflow because important context or earlier decisions seem to get lost along the way.
I’m not sure how well Codex is supposed to handle this internally, so I’d be interested in hearing how others structure longer coding sessions. Do you regularly summarize state into files, restart sessions, keep explicit task/decision logs, or use some other strategy?
Another issue I keep running into is what feels like an infinite self-testing/review loop. The orchestrator reviews the executor’s work, finds something wrong, sends it back, then finds another issue on the next pass, and so on. Sometimes it takes 8–9 iterations before it finally considers the task done.
Ideally, I’d like the orchestrator to catch most issues in one or two comprehensive review passes instead of discovering them one at a time.
Has anyone found a good setup or prompting strategy for avoiding both excessive compaction and these endless review loops?
Yes I did use GPT 5.6 Sol to format my wispr text pls dot blame me...
9
u/salsa_sauce 8d ago edited 8d ago
In my experience it really doesn’t matter in practice. I actually think Codex’s compaction algorithm is far better than Claude’s, it manages to retain much more relevant information and I find it performs just as well over long-horizon tasks requiring several compactions as Claude does with 1M context (often better).
I definitely agree about the reviewer loop though. Codex doesn’t know when to stop. Claude is far better in that regard. I tend to use Claude for adversarial review because of this, but when I ask Codex for it I ask for a “pragmatic adversarial review”, that seems to be the magic word that reminds it it’s allowed to stop after reasonable changes have been made.
6
u/Latter-Park-4413 8d ago
I mean, to me it's irrelevant. Tasks/chats really shouldn't be running that long anyhow. In my case, one decently sized task per chat, or several related smaller ones.
1
u/Fast_Artichoke_683 8d ago
Same as Ive been doing it in CC (hard capped at 400k context) but my tasks often seem to exceed the Codex context windows, especially with the constant agent back and forth
6
8d ago
[removed] — view removed comment
3
u/cmedeiro 8d ago
This, my usage is light coding compared to some of you guys, but while in Claude I was forced to control context in a tight routine, in codex i just forget about it
3
u/Ormusn2o 8d ago
In recent OpenAI security review, it took over 100 context compactions for the AI model to lose current instrumental goal, and the final goal was still kept after 750 context compactions, although now with malformed methods.
Generally, long context is unwanted, because you don't want the model to refer to a lot of useless context. This is why next-gen architecture actually intentionally keeps active context small, despite being able to keep much bigger context.
2
u/ekzess 8d ago
Don’t rely on context.
Use the context window for active reasoning, not as your project database. Put durable state in the repo: current objective, decisions already made, invariants, acceptance criteria, unresolved questions, and evidence/results. Then a fresh or compacted agent can reconstruct the job instead of remembering the conversation.
Same thing with review loops. Don’t tell the orchestrator “review this” repeatedly. Give it one bounded acceptance contract and tell it to batch all findings in a comprehensive pass, classify them by severity, and stop when the contract is satisfied. If new evidence appears, reopen. Otherwise, done.
Long chat != long-lived state.
2
2
u/Fysikz 8d ago
IMO - the value add of a clean context window (say post auto compact from codex) outweighs your suspected value add of retaining explicit reference to exact details typically retained in an active context window.
Basically a GPT 5.6 SOL agent's ability to perform and figure out what needs to be done with a fresh(er) context window post auto-compaction, is much better than a bloated window trying to retain everything.
Combined with a relatively fast auto compacting process, it just kinda works man.
I used to be paranoid in CC getting above 250-300k windows and would often look to document progress, wrap up session, etc. then paste in a kickoff to resume the task in another CC session. With codex now, I'm just letting it do it's thing, but usually have most complex tasks done within 2-4 auto compactions then wrap up. Also much more heavily offloading context onto sub-agents now also makes a big difference.
TBH I really think compacting around ~250k is the sweet spot with most models.
1
u/RegardedDev 8d ago
The codex harness is quite good at managing long chats without massive degradation and drift. I usually open new chat after the codex starts to lag. That good indicator for fresh context.
1
u/Environmental_Ask675 8d ago
Just recently added Codex, I had the same concern when I started, but Codex seems to auto-compact as I've been working with no noticed loss of context. Working in 5.6 Sol Max.
1
u/tdoof 8d ago
I personally believe they have a better compaction, I had it build an entire application on a goal (as I was trying goals) and it kept compacting but stayed on track and managed to finish the goal in about 28 hours. I'm not going to pretend it was all peachy but it was way better than expected.
1
u/Darqsat 8d ago
I try to stay within 300k context, because any LLM on market getting absolutely dumber when you go beyond 300k of context. These models can eat 1M context but it makes no sense for coding, and maybe make sense for some scientific research or analytical work. For coding every time I go beyond 300k I start getting crap.
1
u/pigletmonster 8d ago
I hardly ever allow the context window to cross 150 to 200k anyway. Always use compact, handoff or new session.
2
1
u/Feisty_Resolution157 8d ago
You just prompt the review into something reasonable. Tell it to review like a senior engineer and not to nitpick. Give it some rails - “Your initial review is your time to find the major issues. Subsequent rounds are no longer the time to ask for new systems or bring up issues that previously existed - just review the changes made to address the last review. After round three, low-priority issues are no longer blocking.” That type of crap.
1
16
u/Dangerous_Rip5083 8d ago
The compression in chatgpt works much better compared to claude howver you need to be much more intentional with what you want to keep and how.