How Codex is built
Summary
OpenAI's multi-agent coding assistant, Codex, is now used by over a million developers weekly, with usage increasing fivefold since January. OpenAI launched a macOS desktop app for Codex in early February and subsequently shipped GPT-5.3-Codex, described as the first self-creating model. The article details how Codex was built, its architecture, and its impact on software engineering at OpenAI, based on interviews with Thibault Sottiaux (Head of Codex), Shao-Qian Mah (Codex researcher), and Emma Tang (Head of Data Infrastructure). Key aspects include its Rust-based core, an open-source agent loop, and the fact that Codex generated over 90% of its own application code. The team also employs unique practices like tiered AI code review, "Agent Skills," and using `AGENTS.md` files for AI instructions.
Key takeaway
For engineering leaders evaluating AI-driven development tools, consider OpenAI's Codex as a model for transforming workflows. Its ability to generate over 90% of its own code and facilitate practices like tiered AI code review suggests significant efficiency gains. Your teams could explore adopting agent-centric development, focusing on structuring code for AI success and leveraging custom skills to automate tasks, potentially accelerating development cycles and re-tasking engineers as "agent managers."
Key insights
OpenAI's Codex, a Rust-based, self-building coding agent, significantly transforms software development practices.
Principles
- Prioritize performance, correctness, and engineering quality in core agent implementation.
- Structure codebases with tests and clear module boundaries for AI agent success.
- Embrace meta-circularity: AI agents can build, test, and debug themselves.
Method
The Codex agent loop involves prompt assembly, model inference, tool calls, and response streaming, with compaction used to manage context window length and reduce quadratic inference costs.
In practice
- Implement `AGENTS.md` files to guide AI agents on codebase navigation and standards.
- Develop custom "Agent Skills" to steer models towards specific behaviors and combine them.
- Utilize AI for automated code review, especially for non-critical code paths.
Topics
- OpenAI Codex
- Multi-Agent Systems
- AI Code Generation
- Software Engineering Practices
- Rust Programming
Code references
Best for: CTO, VP of Engineering/Data, Director of AI/ML, Software Engineer, Machine Learning Engineer, AI Architect
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by The Pragmatic Engineer.