What Is OpenAI Codex? Pricing, Features and How It Works

What OpenAI Codex is, how its CLI, IDE extension and cloud agent work, how to install it, and what it costs on ChatGPT Plus, Pro, Business and Enterprise plans.

Official OpenAI branding card reading Codex CLI with the ChatGPT and OpenAI logos on a blue gradient background
OpenAI's official Codex CLI documentation card. Image: OpenAI.

OpenAI Codex is OpenAI's AI coding agent: a tool that reads, writes, tests and fixes code inside your own repositories, available as a command-line app (Codex CLI), an extension for editors like VS Code, Cursor and Windsurf, and a cloud agent you can run from ChatGPT on the web, desktop or mobile. It is included with ChatGPT Plus, Pro, Business, Enterprise and Edu plans, or billable separately through an OpenAI API key, and it runs on OpenAI's current coding-optimized models rather than a single fixed model.

Codex at a glance
  • What: OpenAI's agentic coding assistant — CLI, IDE extension, desktop/web app and cloud task runner
  • Launched: Cloud agent on May 16, 2025; open-source Codex CLI on April 16, 2025
  • Access: Bundled with ChatGPT Plus ($20/mo), Pro (from $100/mo), Business and Enterprise, or pay-per-token via the OpenAI API
  • Install CLI: npm install -g @openai/codex, Homebrew, or OpenAI's install script
  • Models: Runs on OpenAI's current GPT coding models, selectable per task

What is OpenAI Codex?

Codex is the umbrella name OpenAI now uses for its agentic software-engineering product line. Instead of just autocompleting a line of code, Codex is designed to take an instruction — "fix this failing test," "add pagination to this API," "find out why this build breaks on Linux" — and then actually go do the work: reading the relevant files, running commands in a sandboxed environment, editing code, running tests, and reporting back with a diff you can review and accept. OpenAI's own developer documentation describes Codex as a tool to "inspect, edit, and run code" from the terminal, and as an agent you can delegate tasks to that "work through" a project in the cloud.

It's worth clearing up a naming collision first. "OpenAI Codex" originally referred to a 2021 family of models that translated natural language into code and powered the first version of GitHub Copilot; those original Codex models were deprecated in March 2023. OpenAI revived the Codex name in 2025 for an unrelated, much more capable product: an agentic coding assistant built on its newer reasoning models. When people search for "OpenAI Codex" today, they almost always mean this current agent product, not the retired 2021 API models.

A quick history: from a 2021 model to a 2025 agent

The current Codex product has two defining launch dates, according to OpenAI. Codex CLI — an open-source, terminal-based coding agent you can run locally against your own files — shipped on April 16, 2025, and its source is published on OpenAI's GitHub. A month later, on May 16, 2025, OpenAI launched the cloud version of Codex: a software-engineering agent, originally powered by a specialized model called codex-1, that could work on multiple coding tasks in parallel inside isolated cloud sandboxes, each one preloaded with a copy of your repository. Since then, OpenAI has folded Codex into its broader ChatGPT subscription structure and moved it onto successive generations of its general coding models rather than a single standalone Codex model.

That pace of change matters for anyone trying to pin down exactly "what Codex is" at any given moment: OpenAI retires and renames models fairly often. As this article was written, OpenAI's own documentation noted that an older model, GPT-5.5, was being retired from Codex for ChatGPT sign-in users on October 14, 2026, in favor of newer models — a reminder that the specific model menu is a moving target, even if the product shape (CLI, IDE extension, app, cloud) has stayed consistent.

How OpenAI Codex works: agentic coding, explained

Codex belongs to a category sometimes called AI coding agents: rather than a single question-and-answer exchange, you give it a goal, and it plans and executes a sequence of actions — reading files, running shell commands, editing code, re-running tests — inside a constrained environment, then shows you what it did. Three things distinguish this from a basic chat-based code helper:

  • It can act, not just answer. Codex can execute commands, run your test suite, and make file edits directly, subject to permission settings you control, rather than only suggesting text for you to paste in.
  • It runs sandboxed. OpenAI's documentation on agent approvals and security describes sandboxing and permission controls that let you decide when Codex can edit files or run commands without asking first, and lets you inspect the active sandbox and writable roots before continuing.
  • It can work across surfaces. The same underlying agent is reachable from a terminal (Codex CLI), inside an editor (the IDE extension), inside the ChatGPT desktop or web app, or dispatched to run unattended in OpenAI's cloud — and work can be handed off between these, for example starting a quick fix locally and then delegating a bigger refactor to the cloud.

You can also hand Codex project-specific instructions through an AGENTS.md file in your repository, similar in spirit to how other coding agents use project-level instruction files, and extend it with Model Context Protocol (MCP) servers, custom "skills," and subagents that split a larger task into parallel pieces.

Codex CLI: installing and using it in your terminal

Codex CLI is the terminal client, and OpenAI documents four supported install paths. For macOS and Linux, it offers a standalone installer script:

MethodPlatformCommand
Standalone installermacOS / Linuxcurl -fsSL https://chatgpt.com/codex/install.sh | sh
Standalone installerWindows (PowerShell)powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
npmmacOS / Linux / Windowsnpm install -g @openai/codex
HomebrewmacOSbrew install --cask codex

After installing, you run codex from inside a project directory, sign in (with a ChatGPT account, or with an API key for usage billed separately), and start describing what you want done — for example, a first prompt as simple as "tell me about this project." From there you can pick a model and reasoning effort with /model, resume a previous session with codex resume, run a one-off scripted task non-interactively with codex exec for use in CI pipelines, request a focused local code review, or push a task out to Codex's cloud environment with codex cloud and pull the result back into your working tree later. Configuration lives in a shared config.toml file that's used by the CLI, the IDE extension and the desktop app alike, so settings like your default model carry across surfaces.

Codex in the IDE, the ChatGPT app, and the cloud

Beyond the terminal, Codex is also built into code editors as an extension, and OpenAI lists first-class support for VS Code, Cursor, Windsurf and VS Code Insiders, plus native integrations inside Xcode and JetBrains IDEs. Inside the editor, Codex can see your open files and selections, propose a diff you review in place, and — when a task is bigger than a quick edit — hand it off to run in the cloud while you keep working elsewhere.

The ChatGPT desktop app (macOS, Windows and Linux) and ChatGPT on the web provide another entry point: you open or create a project folder, choose "Codex" from the mode switcher for software work with codebase context, and send a task. For work that should run unattended — long migrations, broad refactors, or several tasks you want to run in parallel — Codex Cloud lets you create a reusable cloud environment connected to your GitHub repositories. Codex inspects the repository, installs dependencies, tests the setup, and then runs tasks inside isolated per-task workspaces that keep working even while your own machine is asleep; results come back as reviewable diffs you can commit or turn into a pull request from web, mobile, or the desktop app. Codex can also be tagged directly inside GitHub pull requests (@codex) for automatic code review and delegated follow-up work.

OpenAI Codex pricing: what's included and what costs extra

Codex is not sold as a standalone subscription. Access comes bundled into ChatGPT plans, or billed per token against an OpenAI API key. According to OpenAI's official Codex pricing page, the current individual plan structure is:

PlanPriceCodex access
Free$0/monthLimited access to a lightweight model in the desktop app, subject to rollout
Go$8/monthLightweight coding tasks with a lightweight model
Plus$20/monthCodex on the web, CLI, IDE extension and iOS; cloud features like automatic code review and Slack integration; current flagship and lightweight models; extendable with purchased ChatGPT credits
ProFrom $100/monthTiers at $100, $200 and $500/month; everything in Plus, with the $500 tier adding "Ultrafast" mode
API keyPay-as-you-goCodex in the CLI, SDK or IDE extension, billed at standard OpenAI API token rates; no cloud-based features such as GitHub review or Slack integration
Business$20/user/month (2+ seats, billed annually) or $25/user/month billed monthlyCodex and ChatGPT across desktop and mobile, larger cloud virtual machines, SAML SSO and MFA, purchasable credits
Enterprise & EduContact salesEverything in Business plus SCIM, audit logs via a Compliance API, data residency controls and priority processing

Two billing mechanics are worth understanding. First, on ChatGPT plans, usage is metered against rolling, model-dependent allowances rather than a flat task count: OpenAI's documentation gives an estimated range of "local messages" per five-hour window that varies by model and plan (for example, far fewer messages on its most capable reasoning model than on its fastest, lightest one), and notes that Pro plans currently have no five-hour cap. Once you exhaust included usage, Plus and Pro users can buy additional credits rather than being forced to upgrade, while Business, Edu and Enterprise workspaces on flexible pricing can purchase workspace credits the same way. Second, if you authenticate Codex with an API key instead of a ChatGPT login, none of that subscription allowance applies — you're billed directly at OpenAI's standard API token pricing, which varies by model and is published separately from the ChatGPT consumer plans.

OpenAI explicitly cautions that API token prices and ChatGPT included-usage limits are separate systems and shouldn't be used to estimate each other — a typical coding task's actual cost depends heavily on model choice, context size, reasoning effort, and how many tool calls it makes, not prompt length alone.

Which models power Codex

Codex doesn't run on one fixed model; OpenAI lets you pick a model and a reasoning-effort level per task, and recommends different models for different jobs. Broadly, OpenAI's guidance (current as of this writing) is to reach for its most capable reasoning model for the hardest, most open-ended engineering work; a mid-tier model described as offering "near-flagship performance at a lower cost" for repeated, long-running work where cost matters; and its fastest, lightest model for narrow, repeatable jobs like extraction or focused one-off edits. A "Max" setting gives a chosen model more time to reason on a single hard task, and an "Ultra" mode splits work across multiple subagents for tasks that can be parallelized. Because OpenAI periodically retires older models from Codex (as it did with the Codex-specific "Spark" model in September 2026 and, per its own retirement notice, with GPT-5.5 in October 2026), it's worth checking OpenAI's current model guidance rather than assuming a model name from an older article or screenshot is still active.

Sandboxing, permissions and enterprise controls

Because Codex can execute commands and edit files on your behalf, OpenAI documents a permissions layer that sits in front of it: you choose when Codex may run commands or edit files automatically versus asking first, and can review the sandbox and the directories it's allowed to write to before a task proceeds. For organizations, Enterprise and Business plans add administrative layers on top — SAML single sign-on and multi-factor authentication, role-based access control, SCIM provisioning, audit logs through a Compliance API, and controls over data retention and residency — and OpenAI states that business and API data are not used to train its models by default.

How Codex fits among other agentic coding tools

Codex is one of several agentic coding assistants that have emerged from major AI labs and developer-tool companies, alongside products like Anthropic's Claude Code and GitHub Copilot's own agent mode. They share the same broad shape — a terminal or editor-based agent that can read a codebase, make edits, run tests and open pull requests with guardrails you control — while differing in underlying models, exact permission and sandboxing models, IDE integrations, and how usage is priced and bundled into each company's subscription plans. If you're deciding between Codex and alternatives for your own workflow, a side-by-side look at current pricing and features for several of these tools, including Codex, is a better starting point than any single vendor's marketing page; see our comparison of leading AI coding tools' prices for more detail. This explainer sticks to what Codex itself is and how it works.

Common questions when getting started

A few practical points come up often for people trying Codex for the first time. Codex for Open Source is a separate OpenAI program that gives maintainers of qualifying open-source projects API credits and extended ChatGPT Pro access with Codex, plus access to Codex's security-review features. Voice input is also billed differently from ordinary Codex usage: OpenAI's pricing documentation notes that using ChatGPT Voice while working in the desktop app draws from the same usage budget at a published per-minute rate, separate from the token cost of whatever model actually carries out the task. And because Codex's usage limits and available models are tied to active rollouts, the two most reliable ways to check your actual current limits are the in-app usage dashboard or, inside an active CLI session, the /status command.

What next

Codex's product shape — a CLI, an IDE extension, a desktop/web app and a cloud task runner, unified behind one account and one set of models — has been broadly stable since mid-2025, but the pricing tiers, included usage, and specific model lineup have all changed multiple times since, most recently with a new mid-priced Pro tier and a round of model retirements in 2026. Anyone evaluating Codex for real work should treat this article as a map of the product rather than a frozen price list, and check OpenAI's own Codex pricing page and Codex CLI documentation directly before budgeting for a team rollout, since OpenAI updates both independently of its broader announcements.

Frequently asked questions

Is OpenAI Codex free to use?

There's a limited free tier: OpenAI's Free ChatGPT plan includes restricted access to a lightweight model in the desktop app, subject to rollout. Meaningful ongoing use of Codex's CLI, IDE extension and cloud features requires a paid ChatGPT plan (Plus and up) or billing through an OpenAI API key.

What is the difference between Codex CLI and Codex Cloud?

Codex CLI runs locally in your terminal against files on your own machine, with you present to approve or steer actions. Codex Cloud runs tasks remotely in OpenAI-managed, repository-connected environments that can keep working unattended and are reviewed afterward as a diff or pull request.

How do I install Codex CLI?

OpenAI supports four install paths: a standalone installer script for macOS/Linux (curl -fsSL https://chatgpt.com/codex/install.sh | sh), a PowerShell installer for Windows, npm install -g @openai/codex, or brew install --cask codex on macOS.

Does ChatGPT Plus include Codex?

Yes. According to OpenAI's Codex pricing page, the $20/month ChatGPT Plus plan includes Codex on the web, in the CLI, in the IDE extension, and on iOS, plus cloud features like automatic code review and Slack integration.

Can I use Codex without a ChatGPT subscription?

Yes, by authenticating with an OpenAI API key instead of signing in with ChatGPT. That route is billed at standard OpenAI API token rates rather than drawing from a ChatGPT plan's included usage, and it excludes cloud-based features such as GitHub code review and Slack integration.

Is OpenAI Codex the same as the original 2021 Codex model?

No. The original OpenAI Codex models from 2021 translated natural language into code via the API and were deprecated in March 2023. The current Codex — the CLI, IDE extension and cloud agent — is a separate, newer product that reused the name starting in 2025.

Sources

More on OpenAI Codex →OpenAI CodexAI coding agentCodex CLIagentic codingChatGPT
Felix Moreau
Written byFelix Moreau

Felix Moreau writes Pandromeda's software coverage and how-to guides. He covers Windows, macOS and Linux updates, the apps people rely on, emulators and developer tools, and turns official documentation into clear, numbered steps that work on the current version.

More from Software & Guides

See all