AI News
AI News AgentModel releaseOpenAI4 min read

OpenAI launches GPT-5.1-Codex-Max for coding

OpenAI has launched GPT-5.1-Codex-Max, a coding model capable of working for hours on complex tasks through context compaction. It is now available in Codex, improves on its predecessor's results, and uses fewer reasoning tokens, although its changes still require human review.

OpenAI has launched GPT-5.1-Codex-Max, a coding-focused model now available in Codex. Its main innovation is not just that it writes code, but that it can stay on task through complex work for much longer.

The model is designed to work on complete projects: refactoring large parts of an application, investigating difficult bugs, reviewing code, and rerunning tests until it finds a solution. OpenAI says it has observed work sessions lasting more than 24 hours in internal evaluations.

A working memory that refreshes

To do this, GPT-5.1-Codex-Max uses a process called compaction. When a session approaches the limit of information it can handle, the system summarizes and preserves what matters most before opening a new context window.

In practice, this allows the agent to keep working without forgetting earlier decisions, relevant files, or errors it has already detected. It is especially useful for tasks that cannot be solved with a single response, such as migrating an entire application or fixing a chain of related failures.

OpenAI says the model can work with millions of tokens in a single task through this process. A token is a unit of text that the model uses to read and generate information, so this figure represents a very large amount of code, instructions, and test results.

More performance with less reasoning

The new model also aims to reduce the cost of its tasks. On SWE-Bench Verified, a test that measures the ability to solve real-world software problems, GPT-5.1-Codex-Max with medium reasoning effort outperforms GPT-5.1-Codex while using 30% fewer reasoning tokens.

OpenAI recommends medium mode for daily use. For tasks where time is not a priority, it adds an Extra High mode, identified as xhigh, which allows the model to spend more time thinking before responding.

In its published comparisons, the model achieves these results:

  • SWE-Bench Verified: 77.9%, compared with 73.7% for GPT-5.1-Codex.
  • SWE-Lancer IC SWE: 79.9%, compared with 66.3%.
  • TerminalBench 2.0: 58.1%, compared with 52.8%.

These are results from specific evaluations, not a guarantee that every project will improve by the same proportion. Performance will depend on the code, instructions, and available tools.

Available in Codex, not yet in the API

GPT-5.1-Codex-Max is available today across the different versions of Codex:

  • Command line, or CLI.
  • Extension for the code editor.
  • Cloud environment.
  • Code review.

The model replaces GPT-5.1-Codex as the default option in Codex interfaces and is included in the ChatGPT Plus, Pro, Business, Edu, and Enterprise plans. API access will come later.

OpenAI clarifies that this is not a general-purpose model like GPT-5.1. It is designed for environments where an agent can read files, run commands, modify code, and check whether its changes work.

What changes for you

If you code, you can delegate longer tasks without constantly splitting them into smaller instructions. For example, Codex could analyze a codebase, update a dependency, fix the resulting errors, run the tests, and prepare a review of the change.

It can also work in Windows environments, a capability that OpenAI had not specifically trained into its earlier Codex models. The company says its training data includes real-world tasks such as creating change requests, reviewing code, building interfaces, and answering technical questions.

That does not make the agent an automatic replacement for a developer. The longer it works without supervision, the more important it becomes to review its changes before adding them to the project or publishing them.

Security and human oversight

Codex runs in an isolated environment by default. It can write only within its workspace and does not have internet access unless the developer enables it. OpenAI recommends keeping these restrictions in place because external content may include malicious instructions designed to trick the agent, a risk known as prompt injection.

The system generates terminal logs and references to its tool calls and test results. Even so, OpenAI stresses that its reviews should be treated as an additional safeguard, not a replacement for human review.

The company also says that GPT-5.1-Codex-Max is its most capable cybersecurity model to date, although it does not reach the high level in cybersecurity defined by its preparedness framework. Because these capabilities can be used both to defend systems and to attack them, OpenAI says it maintains dedicated monitoring and is preparing additional safeguards.

The important step is not that the model writes a better function, but that it can sustain an engineering task for hours, remember what matters, and correct itself along the way. What remains to be seen is whether that autonomy holds up outside internal evaluations and how much oversight it still needs before its changes reach production.