OpenAI introduces GPT-5.1-Codex-Max. This is an agentic coding model designed for long-running and complex development workflows with very large context windows.
The model builds on a revamped reasoning architecture trained on tasks such as software development, mathematics, and research. With this release, OpenAI focuses on higher speed, greater intelligence, and more efficient use of tokens throughout all stages of the development process.
One of the most notable innovations is support for compaction, a technique that enables the model to seamlessly manage multiple context windows and perform tasks involving millions of tokens within a single session.
This enables large-scale refactors, extensive debugging rounds, and work cycles lasting several hours. GPT-5.1-Codex-Max is available immediately within the Codex environment in the CLI, IDE extension, and cloud; API access will follow later.
The model has been trained on realistic software engineering tasks. These include drafting pull requests, code reviews, front-end development, and technical Q&A. In virtually all relevant evaluations, it outperforms previous models. In addition, considerable attention has been paid to smooth operation within Windows environments and consistent interaction in the Codex CLI.
Thanks to improved token efficiency, the medium reasoning time setting achieves better results than the previous generation with fewer tokens. For situations where latency is less important, an extra high reasoning time can be selected to further increase the quality of the result.
Jobs can run longer than a day
Compaction makes it possible to continue working without interruption when the context limit is approaching. In the Codex application, the session is automatically compacted so that the task remains coherent and the model can continue to reason independently. Internal tests show that this allows the model to continue working for long periods of time and ultimately arrive at technically correct and fully functional solutions, even in processes that run for more than a day.
Security measures have also been tightened. With its improved ability to sustain longer reasoning, the model performs better with large codebases and security tasks.
Although GPT-5.1-Codex-Max does not reach the highest cyber capability level in OpenAI’s preparedness framework, it is the most powerful security-focused model that OpenAI has deployed to date. The Codex environment works with sandbox measures by default, limiting file writing to the project folder and disabling network access by default.
Developers are advised to leave these restrictions in place to reduce risks such as prompt injections. In addition, all tool actions and test results are logged, and the model is intended as a supplementary reviewer, not a replacement for human review.
GPT-5.1-Codex-Max is available to ChatGPT Plus, Pro, Business, Edu, and Enterprise users within the Codex environment. It replaces the default model for complex coding processes and is recommended for all agentic software engineering tasks. Use outside of Codex or similar controlled environments is not recommended.