GPT-5.1-Codex-Max can code for 24 hours straight without losing the plot
Curated by the Inblix editorial team
OpenAI just dropped GPT-5.1-Codex-Max, and the headline feature isn’t just smarter code—it’s stamina. This is the first model natively trained to handle what the company calls ‘compaction,’ a process that lets it prune its own context history while preserving the critical bits. The result? A coding agent that can churn away on a single task for over 24 hours without its brain turning to mush. We’ve seen long-context models before, but they usually get lost in the weeds. This one actively manages its own memory to stay coherent across millions of tokens.
The efficiency gains are tangible, not just vibes. On SWE-bench Verified, GPT-5.1-Codex-Max matches the performance of its predecessor while chewing through 30% fewer ‘thinking tokens’ at medium reasoning effort. For latency-insensitive deep dives, there’s a new ‘xhigh’ reasoning tier that lets the model think even longer. OpenAI is pitching medium as the daily driver, but that xhigh mode is where the 24-hour autonomous debugging marathons live. The model can now operate in Windows environments too, a first for the Codex line, and it’s been specifically trained to be a better collaborator inside the Codex CLI rather than just a solo artist.
The real unlock here is project-scale work that used to be impossible. Think complex refactors that span an entire codebase or deep debugging sessions where the bug’s root cause is buried under layers of earlier decisions. Compaction lets the model hit a sort of ‘save point,’ clear its immediate context window, and keep going. It repeats this loop until the job is done. The company says it’s seen the model persist through test failures, iterate on its own implementations, and eventually ship working code—all without human intervention. That’s a fundamentally different kind of tool than an autocomplete on steroids.
Cybersecurity capabilities are ratcheting up alongside the coding chops. OpenAI admits this is their most capable cybersecurity model yet, though it hasn’t hit their internal ‘High’ threat threshold. Still, they’re scrambling to build out mitigations and have already disrupted real-world cyber operations trying to misuse their models. They’re walking a tightrope—pushing agentic capabilities forward while trying to ensure defenders get the same tools through programs like Aardvark. Codex still runs sandboxed by default, with file writes locked to a workspace and network access off unless explicitly enabled. For now, that’s the safety net. Whether it holds up when the model can think for a day straight is an open question.
💡 Key Takeaways
- GPT-5.1-Codex-Max introduces 'compaction,' allowing it to autonomously manage context and sustain coherent work across multiple context windows for over 24 hours.
- The model achieves a 30% reduction in thinking tokens on SWE-bench Verified at medium reasoning effort, matching the performance of its less efficient predecessor.
- A new 'xhigh' reasoning effort mode enables extended thinking for complex, latency-insensitive tasks like multi-hour autonomous debugging sessions.
- OpenAI confirms this is their most capable cybersecurity model deployed, actively disrupting misuse while scrambling to prepare mitigations for rapidly evolving agentic threats.
Keep reading: See related articles below for more coverage on this topic.
Get smarter about AI
The sharpest AI news, curated daily. Delivered free to your inbox.