TLDR Tech / Dev
How OpenAI built Codex: inside the agent loop and harness
OpenAI Codex uses a single shared Rust-based "harness" to power its cross-platform coding agent across multiple client surfaces like CLI, web, VS Code, and macOS. At its heart, an agent loop orchestrates model inference, tool calls, and prompt updates, with prompt caching and context compaction built-in. All clients interact with the Codex core via a stable, bidirectional JSON-RPC App Server protocol.
Read the full story