OpenAI Codex Explained

OpenAI Codex launched as a cloud-based software engineering agent in May 2025. It runs coding tasks inside isolated cloud sandboxes, writes and tests code, and proposes pull requests without requiring a developer to stay at the keyboard. Since then, it has added a CLI tool, IDE extensions, and a new pricing structure tied to API token consumption. Here is what Codex does, how it works, and what it costs.

What Is OpenAI Codex?

OpenAI Codex is an AI coding agent built into ChatGPT. It can write new features, fix bugs, answer questions about a codebase, run test suites, and open pull requests — all in the background while engineers focus on other work. The agent is available through the ChatGPT web interface, an open-source command-line tool called Codex CLI, and a VS Code extension. According to usage data tracked across the AI coding tools segment, 90% of Fortune 100 companies now use Codex-powered coding assistants.

The original Codex model — which powered the first version of GitHub Copilot — was deprecated in March 2023. The current Codex is a separate product built on codex-1, a fine-tuned version of OpenAI’s o3 reasoning model optimized for software engineering.

How OpenAI Codex Works

The codex-1 Model

Codex runs on codex-1, trained with reinforcement learning on real-world coding tasks across many development environments. The goal during training was to produce code that matches human style and pull request conventions — not just code that is technically correct. Compared to standard o3, codex-1 generates cleaner diffs that go directly into review queues without heavy cleanup. The model operates with a 192,000-token context window, which lets it process large codebases in a single session.

Sandboxed Cloud Execution

Each task runs in an isolated Linux container preloaded with the developer’s repository. During execution, internet access is disabled by default. The agent reads and edits files, runs linters, executes test harnesses, and issues shell commands — all within that container. Every run produces terminal logs and diff files so reviewers can trace exactly how Codex reached a change. Understanding how AI integrates with cloud infrastructure matters here: Codex’s sandboxing means proprietary code never touches OpenAI’s production servers during task execution.

Key Features of OpenAI Codex

Codex Web

The cloud agent lives inside ChatGPT’s sidebar. Developers assign tasks by typing a prompt and clicking “Code,” or ask codebase questions using “Ask.” Multiple tasks run in parallel, each in its own container. Harvey, an early adopter, reported cutting early iteration time by 30–50% using Codex in this mode.

Codex CLI

The open-source command-line tool runs locally on a developer’s machine. It integrates with Git, supports multimodal inputs including screenshots and diagrams, and connects to the same ChatGPT account used for cloud tasks. Teams that need offline operation or tighter privacy controls typically use the CLI over the web interface.

Automations and Skills

Codex can run unprompted via Automations — handling issue triage, CI/CD monitoring, and alert scanning without a developer initiating each task. The Skills feature extends Codex beyond pure code generation into documentation, code understanding, and prototyping workflows aligned to a team’s specific standards.

OpenAI Codex Benchmark Performance

Codex-1 recorded 37% accuracy on first attempts across software engineering tasks. With multiple retries, that number reaches 70.2%. On SWE-Bench — an industry benchmark for real-world software engineering — Codex-1 reached 85% accuracy after eight attempts. OpenAI’s internal evaluations showed 75% accuracy on engineering tasks, up from earlier model generations.

Codex-1 Accuracy by Evaluation Type (%)
First Attempt 37% With Retries 70.2% SWE-Bench (8 attempts) 85% Internal OpenAI Tasks 75%

GPT-5.3-Codex, released in early 2026, pushed SWE-Bench Pro performance further while running 25% faster than the previous generation. It was the first model OpenAI described as instrumental in its own development — the Codex team used it to debug training, manage deployment, and diagnose evaluation results.

OpenAI Codex Pricing

Codex is included in paid ChatGPT subscriptions. There is no separate Codex plan. As of April 2, 2026, OpenAI moved from per-message pricing to token-based billing for Business and Enterprise accounts. Credits remain the core billing unit — usage draws from a shared pool based on input tokens, cached tokens, and output tokens consumed.

ChatGPT Plan Pricing Including Codex Access (USD/month)
Plus $20 / mo Pro $200 / mo Business $30 / user / mo API (codex-mini) $1.50 per 1M input tokens · $6.00 per 1M output tokens

On average, Codex costs $100–$200 per developer per month, though actual spend varies by model used, number of parallel instances, and automation frequency. Business and Enterprise workspaces can purchase additional credits once plan limits are reached. OpenAI also offers a GPT-5.4-mini fallback for lower-cost usage when limits are close.

Who Uses OpenAI Codex?

OpenAI engineers use Codex daily to offload refactoring, renaming, and test writing — tasks that would otherwise break focus. Cisco reduced code review times by 50% after deploying it across their engineering teams. Duolingo reported a 67% reduction in median code review turnaround and a 70% increase in pull request volume. Superhuman uses it to let product managers contribute minor code changes without pulling in engineers for full development cycles. Developer adoption rates across AI coding tools show 76% of developers are using or planning to use AI code assistants as of 2024, with that number expected to grow through 2026.

OpenAI Codex vs. GitHub Copilot and Other AI Coding Tools

GitHub Copilot is primarily an in-editor completion tool. Codex operates as an autonomous agent that compiles, tests, and submits code without staying inside an IDE. The comparison is closer between Codex and tools like Claude Code or Cursor. The AI-assisted coding market reached $7.37 billion in 2025 and is projected to grow to $23.97 billion by 2030. GitHub Copilot holds 42% of that market; Codex competes in the autonomous agent tier where task complexity, not simple autocompletion, is the primary value.

The key difference in Codex’s favor is execution. Where most tools suggest code, Codex runs it, checks test results, and surfaces logs — giving reviewers hard evidence before they touch a diff. That closed-loop approach costs more compute per task, which explains why per-task costs are higher than single inference calls from competing products.

FAQs

What is OpenAI Codex used for?

OpenAI Codex is used for writing code, fixing bugs, running tests, refactoring, and opening pull requests autonomously. It operates in isolated cloud sandboxes and can handle multiple tasks in parallel without developer supervision.

Is OpenAI Codex free?

Codex is not free. It is included in paid ChatGPT plans starting at $20 per month for Plus. There is no standalone free tier, though usage limits vary by plan and additional credits can be purchased.

How is OpenAI Codex different from the original Codex API?

The original Codex API, which powered early GitHub Copilot, was deprecated in March 2023. The current Codex is a full coding agent built on codex-1, offering cloud sandboxes, CLI tools, and pull request automation — not just code completion.

What is codex-1?

Codex-1 is the model powering OpenAI Codex. It is a fine-tuned version of OpenAI’s o3 model, trained with reinforcement learning on real-world coding tasks to produce code that matches human style and pull request conventions.

What is the OpenAI Codex CLI?

Codex CLI is an open-source command-line tool that runs the Codex agent locally on a developer’s machine. It integrates with Git, supports multimodal inputs, and connects to a ChatGPT account for authentication and usage tracking.

Stay Connected

Related Posts