OpenAI drops GPT-5.1-Codex-Max for marathon coding
OpenAI just launched GPT-5.1-Codex-Max, an agentic coding model built to run continuously for over 24 hours. Using native context compaction, it works seamlessly across multiple windows on multi-million-token refactors while cutting thinking tokens by 30%. It is now the default engine inside Codex.

Every developer knows the pain of watching an AI agent choke on a long refactor because it ran out of context and forgot what it was doing ten minutes ago.
OpenAI is trying to kill that ceiling for good.
The company just launched GPT-5.1-Codex-Max, its newest frontier agentic coding model. It immediately replaces GPT-5.1-Codex as the default engine across Codex surfaces, including the CLI, IDE extensions, cloud setups, and code review tools.
Smarter memory over brute force
The marquee breakthrough here is a native mechanism OpenAI calls compaction.
Instead of blowing through a single context window and crashing, GPT-5.1-Codex-Max is trained to operate across multiple windows. When it approaches memory limits, it automatically prunes low-priority history, preserves the crucial state, and rolls into a fresh window. This lets the agent chew through millions of tokens in a single coherent run.
In internal testing, OpenAI says the model ran autonomous loops for over 24 hours straight, relentlessly patching test failures until the job was done.
It is also OpenAI's first model explicitly trained to navigate Windows environments, alongside improved workflows in the Codex CLI and cheaper frontend generation.
Less thinking, better answers
Interestingly, the extra brainpower comes with a smaller token bill.
On SWE-bench Verified, running at a medium reasoning effort, the new model beat its predecessor while burning 30% fewer thinking tokens. For brutal bugs where latency does not matter, OpenAI added an Extra High reasoning mode. With that cranked up, it hit 77.9% on SWE-bench Verified and jumped to 79.9% on SWE-Lancer IC SWE.
OpenAI also shared internal numbers: 95% of its engineers use Codex weekly, and those teams ship roughly 70% more pull requests.
On the security side, Codex runs in a locked sandbox by default with network access disabled to prevent prompt injections. While OpenAI notes this is its most capable cybersecurity model yet, it has not breached their internal high-risk threshold.
Subscribers on ChatGPT Plus, Pro, Business, Edu, and Enterprise plans have access now, with API access arriving shortly.
Why it matters
We think OpenAI made a brilliant architectural pivot here by giving up on the race for infinite raw context windows.
Brute-forcing million-token windows is computationally ruinous and notoriously prone to attention decay. By natively training compaction into the agent, OpenAI is essentially teaching the AI how to take good notes, discard scrap paper, and keep moving. For engineers, this transforms AI from a snippet generator into a true background worker capable of tackling messy, multi-hour refactors.
This raises the competitive bar for the entire ecosystem. Rivals competing purely on raw coding benchmarks are now fighting yesterday's war; the real game is agentic endurance and cost efficiency.
That said, autonomous agents working around the clock create fresh headaches. When a model churns through code for 24 hours, reviewing the resulting pull request can become an exhausting chore. OpenAI itself warns that Codex is an extra reviewer, not a human replacement, and keeping trust intact across massive autonomous commits will be the real hurdle.
Sources (1)
- openai.com(opens in a new tab)Originalopenai.com