OpenAI Codex.
From the model that launched the AI coding revolution to today's autonomous agent. A complete guide to what OpenAI Codex is, how developers use it in 2026, and how it compares to Claude Code and other AI coding tools.
The Evolution of OpenAI Codex
Understanding where Codex came from helps you understand where it is today and where it is going.
The Original Codex Model
OpenAI released Codex as a GPT-3 descendant fine-tuned on billions of lines of public code. It powered the first version of GitHub Copilot and proved that large language models could generate useful code. It understood 12+ programming languages and could translate natural language to code.
Deprecation and Transition
OpenAI deprecated the Codex API in March 2023 as GPT-4 proved superior for coding tasks across every benchmark. The dedicated code model approach gave way to general-purpose models with strong coding capabilities. Copilot switched to GPT-4 Turbo under the hood.
Codex Reborn as an Agent
OpenAI relaunched Codex in May 2025 as an autonomous coding agent powered by codex-1 (a fine-tuned o3 model). Each task runs in its own isolated cloud sandbox preloaded with your repository. It can compile code, execute tests, run linters, and issue shell commands. In June 2025, they added internet access, voice dictation, and the budget codex-mini model at $1.50/MTok input. The open-source Codex CLI brought local terminal access.
Current State: GPT-5.4 Powered
Codex now runs on GPT-5.4, scoring around 70% on SWE-bench Verified. Available through ChatGPT Plus ($20/mo), Pro ($200/mo), and Business plans. Codex CLI uses GPT-5 by default and is open-source. The codex-mini model offers the cheapest code inference at $1.50/MTok input. Still trailing Claude Code on benchmarks (80.9%) but the parallel task execution and cloud sandbox approach has a strong following.
How Developers Use Codex in 2026
The Codex agent fits into modern development workflows in several ways.
Autonomous Bug Fixes
Point Codex at a GitHub issue, and it clones your repo, reproduces the bug, writes a fix, adds tests, and opens a PR. Best for well-documented bugs with clear reproduction steps. Success rate depends heavily on how well the issue is described.
Feature Implementation
Describe a feature in natural language, and Codex implements it across your codebase. It handles creating new files, modifying existing ones, and updating tests. Works best for features that follow existing patterns in your codebase rather than novel architecture.
Code Review and Refactoring
Ask Codex to review a PR or refactor a module. It can identify code smells, suggest improvements, and implement the changes. The sandboxed environment means it can run your test suite to verify nothing breaks.
ChatGPT Code Interpreter
Beyond the agent, GPT-5.4 powers code execution in ChatGPT. Write Python, run data analysis, generate visualizations, and prototype algorithms directly in the chat interface. This is the most accessible way to use OpenAI for code without any developer tooling.
Codex vs Claude Code: The Agent Showdown
The two most capable autonomous coding agents have different philosophies and strengths. For a broader comparison, see our AI coding tools comparison and AI IDE comparison.
Execution Environment
Codex runs in a sandboxed cloud VM. Claude Code runs in your local terminal. This means Codex is safer (isolated environment) but slower (needs to clone your repo). Claude Code has instant access to your full development environment but requires trust in local execution.
Benchmark Performance
Claude Code leads on SWE-bench Verified at 80.9% versus Codex at approximately 70%. For complex multi-file refactoring and architectural tasks, Claude Code is measurably more capable. Codex performs well on straightforward bug fixes and feature additions where the scope is clear.
Ecosystem Integration
Codex integrates with ChatGPT, making it accessible to anyone with an OpenAI account. Claude Code integrates with your terminal, git, and existing development workflow. If you live in the OpenAI ecosystem, Codex is more natural. If you live in the terminal, Claude Code fits better.
Learn to Work with AI Coding Agents
Whether you use Codex, Claude Code, or any AI agent, the skill of directing autonomous coding tools is what separates productive developers from frustrated ones. Our course teaches the task decomposition, context management, and review patterns that make AI agents deliver production-quality results.
Get the Accelerator for $79.99Frequently Asked Questions
OpenAI Codex started as a specialized code generation model released in 2021 that powered the original GitHub Copilot. The original API was deprecated in March 2023. In May 2025, OpenAI relaunched Codex as a cloud-based software engineering agent powered by codex-1, a version of o3 optimized for coding. It now comes in three forms: Codex Web (autonomous agent in ChatGPT), Codex CLI (open-source terminal tool using GPT-5), and the codex-mini model ($1.50/MTok input) for fast code generation.
The original Codex API was deprecated in March 2023, but OpenAI relaunched Codex in May 2025. The current Codex agent is available through multiple ChatGPT tiers: Plus ($20/month), Pro ($200/month for 10x usage), Business ($25-30/user/month), and Enterprise (custom). It runs in isolated cloud sandbox environments preloaded with your repository. The Codex CLI is also available as a free, open-source command-line tool.
Both are autonomous coding agents with different philosophies. Claude Code runs in your local terminal with direct access to your dev environment and CLAUDE.md context files. Codex runs each task in an isolated cloud sandbox preloaded with your repo. Claude Code leads on SWE-bench (80.9% vs Codex at ~70%). Codex can run multiple tasks in parallel across separate containers. Claude Code has deeper git integration. Both cost $20/month at the entry tier.
Codex Web (the cloud agent) is available starting at ChatGPT Plus ($20/month). ChatGPT Pro ($200/month) gives 10x the usage. The Codex CLI is completely free and open-source — it runs locally on your machine and uses GPT-5 by default. For API access, codex-mini costs just $1.50 per million input tokens, making it one of the cheapest code-optimized models available.
The original Codex model (based on GPT-3) was deprecated when OpenAI shifted to GPT-4 and later GPT-5 series models. These newer models outperform the original Codex on every coding benchmark. The Codex brand was revived for the autonomous agent product, but the underlying technology is completely different from the 2021 model.
They serve different workflows. Copilot is an inline coding assistant that integrates into your editor for real-time suggestions and completions. Codex is an autonomous agent that handles entire tasks in the background. Many developers use both: Copilot for line-by-line coding and Codex for larger, well-defined tasks like bug fixes and feature implementations.