TLDR Tech / Dev
How OpenAI Codex Works
OpenAI's Codex coding agent uses an "agent loop" that iteratively constructs prompts, interacts with the model, and executes tool calls like running commands or tests until a task is complete. Managing the growing conversation history and layered context is done through prompt caching and context window compaction to maintain performance. To support various interfaces, from CLIs to IDEs, OpenAI developed a bidirectional App Server protocol that encapsulates the core agent logic.
Read the full story