GPT-5.1-Codex-Max: Long-Horizon Coding with Compaction
GPT-5.1-Codex-Max: Long-Horizon Coding with Compaction
ChatGPT
OpenAI
3 dic 2025


The problem your team keeps hitting
For too long, AI has been excellent at short, single-step tasks, but struggles with multi-day software engineering projects that require deep context and sustained focus. Are you constantly restarting your coding agent because it lost the thread in a complex refactor?
Meet the model built for long-horizon coding
OpenAI’s new GPT-5.1-Codex-Max is specifically designed to overcome this limitation. This is a specialised agentic coding model built for long-running, project-scale work. Its foundational innovation is compaction.
How compaction sustains context
Compaction is a native training process that allows the model to prune its history while coherently preserving the most critical context across multiple context windows, effectively enabling it to work over millions of tokens. This allows the model to:
Sustain complex, iterative workflows like multi-file refactors and prolonged debugging.
Work autonomously for periods exceeding a day.
What this unlocks for engineering productivity
This capability transforms your engineering productivity by removing friction and maximising efficiency. Instead of manual context management or constantly fixing missteps, you get reliable, high-quality implementations with significant performance gains:
Faster, cheaper reasoning: Codex-Max uses approximately 30% fewer “thinking tokens” for similar reasoning effort compared to its predecessor, leading to cost and speed improvements.
Project-level coherence: It maintains a project-level perspective, eliminating the need to manually supply context across iterations.
Proven productivity uplift: Organisations adopting Codex have seen their engineers ship roughly 70% more pull requests.
This model helps your team achieve clarity from chaos by confidently delegating complex, long-horizon coding tasks.
How to put it into practice
To ensure your development programme benefits from this advanced agent:
Use stepwise instructions: Break down large coding jobs into a clear sequence of subtasks (e.g., “1) run tests 2) fix top 3 failing tests 3) summarise changes”).
Choose the right tool: Use Codex-Max for multi-file refactors and complex agentic workflows, reserving standard models for quick edits.
Secure implementation: Remember that enabling network access introduces prompt injection risks. Ensure agents run in secure, sandboxed environments by default.
Contact us to discuss integrating long-horizon agents into your software development life cycle.
FAQ
1) What exactly is “compaction”—is it just summarisation?
No. It’s a native training/process for working across multiple context windows, pruning and preserving critical state so a session can span millions of tokens coherently—beyond a single window’s size. OpenAI+1
2) How long can Codex-Max run by itself?
OpenAI reports internal runs exceeding 24 hours on long-horizon tasks. You should still gate merges with human review. OpenAI
3) Is it cheaper or faster than older Codex models?
At the same “reasoning effort”, Codex-Max uses ~30% fewer thinking tokens—often improving speed/cost for comparable outcomes. OpenAI
4) What are the security defaults?
Codex runs in a sandbox, with network access disabled unless you turn it on. Enabling web/search increases prompt-injection risk; use allow-lists and scanning. OpenAI
5) Where can I use it?
In Codex via ChatGPT plans (Plus/Pro/Business/Edu/Enterprise) across CLI, IDE extension, cloud, and code review; API availability is planned. OpenAI
The problem your team keeps hitting
For too long, AI has been excellent at short, single-step tasks, but struggles with multi-day software engineering projects that require deep context and sustained focus. Are you constantly restarting your coding agent because it lost the thread in a complex refactor?
Meet the model built for long-horizon coding
OpenAI’s new GPT-5.1-Codex-Max is specifically designed to overcome this limitation. This is a specialised agentic coding model built for long-running, project-scale work. Its foundational innovation is compaction.
How compaction sustains context
Compaction is a native training process that allows the model to prune its history while coherently preserving the most critical context across multiple context windows, effectively enabling it to work over millions of tokens. This allows the model to:
Sustain complex, iterative workflows like multi-file refactors and prolonged debugging.
Work autonomously for periods exceeding a day.
What this unlocks for engineering productivity
This capability transforms your engineering productivity by removing friction and maximising efficiency. Instead of manual context management or constantly fixing missteps, you get reliable, high-quality implementations with significant performance gains:
Faster, cheaper reasoning: Codex-Max uses approximately 30% fewer “thinking tokens” for similar reasoning effort compared to its predecessor, leading to cost and speed improvements.
Project-level coherence: It maintains a project-level perspective, eliminating the need to manually supply context across iterations.
Proven productivity uplift: Organisations adopting Codex have seen their engineers ship roughly 70% more pull requests.
This model helps your team achieve clarity from chaos by confidently delegating complex, long-horizon coding tasks.
How to put it into practice
To ensure your development programme benefits from this advanced agent:
Use stepwise instructions: Break down large coding jobs into a clear sequence of subtasks (e.g., “1) run tests 2) fix top 3 failing tests 3) summarise changes”).
Choose the right tool: Use Codex-Max for multi-file refactors and complex agentic workflows, reserving standard models for quick edits.
Secure implementation: Remember that enabling network access introduces prompt injection risks. Ensure agents run in secure, sandboxed environments by default.
Contact us to discuss integrating long-horizon agents into your software development life cycle.
FAQ
1) What exactly is “compaction”—is it just summarisation?
No. It’s a native training/process for working across multiple context windows, pruning and preserving critical state so a session can span millions of tokens coherently—beyond a single window’s size. OpenAI+1
2) How long can Codex-Max run by itself?
OpenAI reports internal runs exceeding 24 hours on long-horizon tasks. You should still gate merges with human review. OpenAI
3) Is it cheaper or faster than older Codex models?
At the same “reasoning effort”, Codex-Max uses ~30% fewer thinking tokens—often improving speed/cost for comparable outcomes. OpenAI
4) What are the security defaults?
Codex runs in a sandbox, with network access disabled unless you turn it on. Enabling web/search increases prompt-injection risk; use allow-lists and scanning. OpenAI
5) Where can I use it?
In Codex via ChatGPT plans (Plus/Pro/Business/Edu/Enterprise) across CLI, IDE extension, cloud, and code review; API availability is planned. OpenAI
Get practical advice delivered to your inbox
By subscribing you consent to Generation Digital storing and processing your details in line with our privacy policy. You can read the full policy at gend.co/privacy.

DBS Bank: AI + Google Cloud boost productivity in 2025

Gemini for Education reaches 1M+ students in Italy

Free ChatGPT for Teachers (U.S. K–12) to June 2027

Scania scales ChatGPT Enterprise across global teams

RAG Models: Boost Enterprise AI Accuracy in 2026

Unlock AI Marketing: 25 Expert Prompts for 2026 Success

OpenAI Certifications: Build Job-Ready AI Skills for 2026

Manage App Integrations in Asana for Seamless, Secure Workflow (2026 Enterprise Guide)

OpenAI & Linux Foundation launch Agentic AI Foundation

OpenAI names Denise Dresser CRO to power 2026 growth

DBS Bank: AI + Google Cloud boost productivity in 2025

Gemini for Education reaches 1M+ students in Italy

Free ChatGPT for Teachers (U.S. K–12) to June 2027

Scania scales ChatGPT Enterprise across global teams

RAG Models: Boost Enterprise AI Accuracy in 2026

Unlock AI Marketing: 25 Expert Prompts for 2026 Success

OpenAI Certifications: Build Job-Ready AI Skills for 2026

Manage App Integrations in Asana for Seamless, Secure Workflow (2026 Enterprise Guide)

OpenAI & Linux Foundation launch Agentic AI Foundation

OpenAI names Denise Dresser CRO to power 2026 growth
Generación
Digital

Oficina en el Reino Unido
33 Queen St,
Londres
EC4R 1AP
Reino Unido
Oficina en Canadá
1 University Ave,
Toronto,
ON M5J 1T1,
Canadá
Oficina NAMER
77 Sands St,
Brooklyn,
NY 11201,
Estados Unidos
Oficina EMEA
Calle Charlemont, Saint Kevin's, Dublín,
D02 VN88,
Irlanda
Oficina en Medio Oriente
6994 Alsharq 3890,
An Narjis,
Riyadh 13343,
Arabia Saudita
Número de la empresa: 256 9431 77 | Derechos de autor 2026 | Términos y Condiciones | Política de Privacidad
Generación
Digital

Oficina en el Reino Unido
33 Queen St,
Londres
EC4R 1AP
Reino Unido
Oficina en Canadá
1 University Ave,
Toronto,
ON M5J 1T1,
Canadá
Oficina NAMER
77 Sands St,
Brooklyn,
NY 11201,
Estados Unidos
Oficina EMEA
Calle Charlemont, Saint Kevin's, Dublín,
D02 VN88,
Irlanda
Oficina en Medio Oriente
6994 Alsharq 3890,
An Narjis,
Riyadh 13343,
Arabia Saudita






