Skip to content
AstroPaper
Go back

OpenAI Codex: From Code Model to AI Agent Ecosystem

Edit page

OpenAI Codex: From Code Model to AI Agent Ecosystem

🧭 Context

This document captures research on OpenAI Codex as part of a broader study of popular AI code agents. The goal is to understand how production AI agents are designed and evolved β€” lessons to inform building a custom AI code agent.

Study path: Aider (articles, completed) β†’ Codex (this document) β†’ more agents to follow.


πŸ“› Naming: What β€œCodex” Actually Means

β€œCodex” is an overloaded name at OpenAI. It has referred to three distinct things over time:

NameWhat It IsStatus
Codex (2021 model)Fine-tuned GPT-3 for code, trained on 159GB of Python from 54M GitHub repos❌ Deprecated (Mar 2023)
codex-1 (2025 model)o3 variant optimized for software engineeringβœ… Active (succeeded by GPT-5.x-Codex)
Codex (2025+ agent)Full AI code agent platform β€” CLI, Cloud, App, IDE extensionβœ… Active

When people say β€œCodex” today, they almost always mean the agent platform, not the original 2021 model.


πŸ“… Development History

The evolution of Codex tells the story of AI moving from autocomplete β†’ agent β†’ platform:

Era 1: The Model (2021–2023)

DateEvent
Aug 2021Codex model launched β€” fine-tuned GPT-3, API private beta
2021–2022Powers GitHub Copilot β€” inline code completion era
Mar 2023Codex model deprecated β€” Copilot moves to GPT-4, name goes dormant

Era 2: The Agent is Born (2025)

DateEvent
Apr 16, 2025Codex CLI open-sourced β€” TypeScript/Node terminal agent
May 16, 2025Codex Cloud launched β€” research preview, powered by codex-1 (o3-based)
Jun 3, 2025Codex Cloud available to ChatGPT Plus users
Jun 2025Rust rewrite of CLI begins, beta released
Aug 28, 2025IDE extension launched β€” VS Code, Cursor, Windsurf
Sep 2025GPT-5-Codex model available via API

Era 3: Full Platform (Late 2025–2026)

DateEvent
Dec 2025GPT-5.2 released (400K context window)
Jan 14, 2026GPT-5.2-Codex β€” optimized for agentic workflows
Feb 5, 2026Desktop app launched (macOS) + GPT-5.3-Codex
Feb 12, 2026GPT-5.3-Codex-Spark β€” low-latency variant
Mar 4, 2026Desktop app on Windows
Mar 5, 2026GPT-5.4 β€” flagship model with computer use
Mar 2026Codex Security β€” dedicated vulnerability-finding agent
Apr 2026CLI is 95.6% Rust. Full suite: App, CLI, IDE, Cloud
timeline
    title Codex Evolution
    section Model Era
        Aug 2021 : Codex model (GPT-3 fine-tune)
        2021-2022 : Powers GitHub Copilot
        Mar 2023 : Model deprecated
    section Agent Era
        Apr 2025 : CLI open-sourced (TypeScript)
        May 2025 : Cloud agent + codex-1 model
        Jun 2025 : Rust rewrite begins
        Aug 2025 : IDE extension
    section Platform Era
        Feb 2026 : Desktop app + GPT-5.3-Codex
        Mar 2026 : GPT-5.4 + Security agent
        Apr 2026 : Full suite mature

The Big Picture

2021  Completion    β†’ predict the next token
2023  Conversation  β†’ understand and respond to instructions
2025  Agency        β†’ plan, use tools, execute autonomously
2026  Platform      β†’ multi-model, multi-interface, multi-agent

Each step added a capability layer: completion β†’ conversation β†’ agency β†’ platform.


πŸ”€ The Four Interfaces: Comprehensive Comparison

Basics

πŸ–₯️ Desktop App🧩 IDE Extension⌨️ CLI☁️ Cloud
ReleasedFeb 5, 2026Aug 28, 2025Apr 16, 2025May 16, 2025
Open SourceNoNoβœ… Yes (Apache 2.0)No
Built WithElectron + Rust coreTypeScript (VS Code ext)Rust (rewritten from TS)OpenAI infra
PlatformmacOS, WindowsmacOS, Linux (Win experimental)macOS, Linux (Win experimental)Web browser
Runs OnLocal machineLocal machineLocal machineOpenAI cloud containers
PricingChatGPT Plus ($20/mo)+ChatGPT Plus ($20/mo)+Free tool + API key or planChatGPT Plus ($20/mo)+

Execution Model

πŸ–₯️ Desktop App🧩 IDE Extension⌨️ CLI☁️ Cloud
Code executionLocal, sandboxedLocalLocal, sandboxedCloud container
Internet accessYesYes (web search)Yes (web search)❌ Disabled by default during agent phase
SandboxBuilt-in worktree isolationEditor-levelConfigurable (workspace-write / full-access)Fully isolated, network-restricted
Parallel tasksβœ… Multi-agent side by side❌ Single thread❌ Single sessionβœ… Multiple tasks in parallel

Feature Matrix

FeatureπŸ–₯️ App🧩 IDE⌨️ CLI☁️ Cloud
Read/edit/run codeβœ…βœ…βœ…βœ…
Git integrationBuilt-inVia editorVia terminalAuto-clone, proposes PRs
Worktree supportβœ… Built-in❌ManualAuto per task
Web searchβœ…βœ…βœ…βŒ (offline default)
Image inputβœ…βœ… Drag & dropβŒβœ…
MCP / Pluginsβœ…βœ…βœ…Limited
Skillsβœ…βœ…βœ…βŒ
Automations / Cronβœ…βŒβŒβŒ
Subagentsβœ…βŒβœ…βœ…
Terminal readingN/Aβœ…N/A (is terminal)N/A
AGENTS.mdβœ…βœ…βœ…βœ…
Model selectionβœ…βœ…βœ…βœ…
Native PR proposalsVia gitVia gitVia gitβœ… Built for async PRs
Review pane / diff UIβœ…Via editorTerminal diffβœ… Web review UI
Secrets managementβŒβŒβŒβœ… Encrypted, setup-phase only

Best For

πŸ–₯️ Desktop App🧩 IDE Extension⌨️ CLI☁️ Cloud
Ideal userPower users managing multiple agentsDevs who live in VS CodeTerminal-native devsAsync delegation
AnalogyCommand centerCopilot on steroidsClaude Code / Aider equivalentJunior dev in background
StrengthMulti-agent orchestration + automationsInline context from open filesLightweight, scriptable, open sourceFire-and-forget parallel tasks

πŸ—οΈ Architecture Highlights

Desktop App (Electron + Rust)

The architecture spans three process layers:

CLI (Rust)

Cloud


πŸ”‘ Models Powering Codex

ModelReleasedNotes
codex-1May 2025o3 variant optimized for SWE
codex-mini-latest2025Smaller model for CLI, $1.50/M input tokens
GPT-5-CodexSep 2025First GPT-5 variant for code
GPT-5.2-CodexJan 2026Context compaction, SWE-Bench Pro 56.4%
GPT-5.3-CodexFeb 2026Improved performance
GPT-5.3-Codex-SparkFeb 2026Low-latency variant for real-time coding
GPT-5.4Mar 2026Flagship, native computer use
GPT-5.4 miniMar 2026Available across all Codex surfaces

πŸ’‘ Lessons for Building an AI Code Agent

From studying Codex’s evolution, several design principles emerge:

  1. Start with CLI β€” Codex started as a simple terminal tool. CLI-first is the fastest way to iterate on an agent loop without UI complexity.

  2. Tool use is the core β€” The agent’s power comes from its tools (file read/write, bash, git, web search), not just the model. Design the tool layer carefully.

  3. Sandboxing matters early β€” Codex invested in sandboxing from day one. Letting an agent run code without guardrails is a non-starter for real usage.

  4. Extensibility via protocol β€” MCP (Model Context Protocol) became the standard plugin mechanism. Building on open protocols beats proprietary plugin systems.

  5. The CLI is the open-source part β€” For studying how agents actually work, the Codex CLI source code (Rust, Apache 2.0) is the primary learning resource.

  6. Model-agent separation β€” The agent layer is model-aware but model-independent in design. The same agent framework ran on codex-1, GPT-5, GPT-5.2, GPT-5.3, and GPT-5.4 β€” swapping models without rewriting the agent.


πŸ”— References


Edit page
Share this post on:

Previous Post
Designing a Config Sync Strategy for Claude Code
Next Post
Getting VS Code Markdown Preview to Match GitHub