Claude Code vs Codex: A Side-by-Side Comparison (2026)
Claude Code vs OpenAI Codex compared on where they run, plans and pricing, models, permissions and sandboxing, extensions, cloud work and open source, with guidance on which fits your team.
Claude Code and Codex are the two coding agents most teams compare first. Both read a codebase, edit files, run commands and open pull requests; both run in a terminal, in an editor, in a desktop app and in the cloud. The differences are in the details: the models behind them, how they are priced, how they keep an agent inside safe limits, and how they extend to the rest of your tools.
This comparison sets the two side by side using Anthropic's and OpenAI's own documentation, current as of October 2026.
Key takeaways
- Claude Code runs Anthropic's Claude models (Fable, Opus, Sonnet and Haiku). Codex runs OpenAI's GPT-6 family models.
- Both start at $20 per month: Claude Code with Claude Pro, Codex with ChatGPT Plus. Codex also offers limited access on ChatGPT Free and Go, subject to rollout. Both have $100+ tiers with higher usage.
- Claude Code controls actions with permission modes, including an auto mode in which a classifier reviews each action. Codex runs commands inside an operating-system sandbox and asks for approval to go beyond it.
- Codex's command-line agent is open source under Apache-2.0. Claude Code's GitHub repository lists no open-source license.
At a glance
| Claude Code | Codex | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Models | Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5 (on the Anthropic API) | GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol, GPT-6 Luna, GPT-6 Astra |
| Where it runs | Terminal, VS Code, JetBrains, desktop app, web | Terminal, IDE extension, ChatGPT desktop app, web and mobile (cloud) |
| Entry plan | Claude Pro, $20 per month ($17 per month billed yearly) | ChatGPT Plus, $20 per month |
| Higher tiers | Max, from $100 per month (5x or 20x Pro usage) | Pro at $100, $200 or $500 per month |
| Pay per use | An Anthropic Console account | An API key, at API prices |
| Project instructions | CLAUDE.md files and auto memory | AGENTS.md files |
| Safety model | Permission modes; auto mode reviews actions with a classifier | OS-level sandbox plus approval policy |
| Extensions | MCP servers, skills, hooks, plugins, subagents | MCP servers, skills, plugins |
| Open source | No license listed on its GitHub repository | CLI under Apache-2.0 |
Where each one runs
Claude Code describes itself as "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools." It runs in the terminal, in VS Code and JetBrains, in a desktop app and on the web. Anthropic notes that "each surface connects to the same underlying Claude Code engine," so instruction files, settings and MCP servers carry over between them. It also connects to GitHub Actions and GitLab CI/CD, Slack, Chrome, and scheduled tasks that run in the cloud or on your desktop.
Codex runs in the Codex CLI, an IDE extension, and the ChatGPT desktop app, which since July 9, 2026 brings Chat, Work and Codex together in one app for macOS and Windows. Codex Cloud runs tasks in prepared cloud environments: each task "has its own workspace and can keep working while your computer is asleep," and you review the changes from the web, mobile or desktop app before committing or opening a pull request.
Both now handle long, parallel work. Anthropic is rolling out a new version of projects in Claude Code (beta), in which "each thread is a Claude Code cloud session working on its own branch and copy of the repo." The Codex app supports several agents in parallel, each on an isolated copy of the code through worktrees.
Plans and pricing
Claude Code
Claude Code is not part of the Free plan. It is included in:
- Pro: $20 per month, or $17 per month with annual billing.
- Max: from $100 per month, with "5x or 20x more usage than Pro."
Developers who prefer to pay per use can sign in with an Anthropic Console account instead. Claude Code's terminal, VS Code and JetBrains versions also support third-party providers such as Amazon Bedrock.
Codex
OpenAI lists these individual options for Codex:
- Free ($0) and Go ($8 per month): GPT-6 Luna at standard speed in the desktop app, "subject to rollout."
- Plus ($20 per month): Codex on the web, in the CLI, in the IDE extension and on iOS; cloud integrations such as automatic code review and Slack; GPT-6.1 Sol and GPT-6 Luna.
- Pro (from $100 per month): plans at $100, $200 or $500, with Ultrafast mode on the $500 plan.
- API key: Codex in the CLI, SDK or IDE extension at API prices, without cloud features such as GitHub code review.
Codex usage is shared with ChatGPT Work. OpenAI publishes estimated local messages per five hours on Plus, for example 15 to 160 with GPT-6.1 Sol, and states that Pro plans "currently have no five-hour limit."
Models
Claude Code chooses among Anthropic's models with aliases. On the Anthropic API, the opus, sonnet and haiku aliases point to Opus 5.5, Sonnet 5.5 and Haiku 5.5. Fable 5.1, which Anthropic calls one of "the most capable models in Claude Code," is selected explicitly for "tasks larger than a single sitting." An opusplan setting plans with Opus and carries out the work with Sonnet.
Codex offers GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol, GPT-6 Luna and GPT-6 Astra, each with a different share of your plan's usage. GPT-6 Luna allows the most messages per period on Plus; GPT-6 Astra the fewest.
Permissions and safety
The two agents take different approaches to letting an agent act without asking about every step.
Claude Code uses permission modes. In manual mode it asks before most actions that edit files, run commands or reach the network. In auto mode, "a second model, the classifier, reviews actions instead of you." Other modes approve file edits automatically, restrict Claude to planning before it edits, allow only pre-approved tools, or skip checks entirely. Auto mode is the starting mode for interactive terminal and VS Code sessions in recent versions.
Codex uses a sandbox and approvals. Commands run "inside a constrained environment instead of running with full access by default," enforced by the operating system: Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native sandbox on Windows. The sandbox decides which files and network resources commands can reach; the approval policy decides when Codex must stop and ask before crossing those limits.
Extending each agent
Both connect to outside tools through the Model Context Protocol (MCP) and both support skills, packaged instructions and scripts the agent loads when relevant. Both have plugins. Anthropic describes Claude plugins as bundles of "skills, connectors, and sub-agents," and a plugin added to your account works in Claude Code as well as in chat. Codex plugins, which package skills and apps, come from the same Plugin Directory as ChatGPT.
Claude Code also lists hooks among its customization options, runs subagents in parallel, and offers the Agent SDK for building custom agents. Codex offers an SDK and a scriptable command for running Codex in automated workflows and CI.
Open source
OpenAI publishes the Codex CLI on GitHub under the Apache-2.0 license, so teams can read, modify and redistribute it. Claude Code has a public GitHub repository, but it lists no open-source license.
Which should you choose?
Choose Claude Code if you want Anthropic's models, a choice of permission modes with a classifier in auto mode, and the same setup across terminal, editors, desktop and web.
Choose Codex if your team already pays for ChatGPT, you want an operating-system sandbox around every command, cloud tasks from ChatGPT on any device, or an open-source CLI.
Use both if different projects favor different models. Many of the surrounding pieces work with either: both read MCP servers, both support skills, and both can publish work to the same tools.
Where the output goes
Coding agents increasingly produce more than code: reports, spreadsheets, decks and dashboards for people who never open a terminal. Claude Code can publish a single page as a Claude artifact on claude.ai, and Codex can build a ChatGPT Site. When a team needs the files themselves, from both agents, in one place it can edit and comment on, an MCP workspace such as Artifacts holds what either agent makes.
Frequently asked questions
Is Codex free?
OpenAI lists GPT-6 Luna in the desktop app on the Free and Go plans, "subject to rollout." It lists Codex on the web, in the CLI and in the IDE extension under Plus.
Is Claude Code free?
No. Claude Code is included in Pro and Max, or used with an Anthropic Console account billed per use.
Can Claude Code and Codex use the same MCP servers?
Yes. Both are MCP clients, so a server you add to one can be added to the other. Each keeps its own list of servers.
Which is better for working in the cloud?
Both run tasks in the cloud. Codex Cloud works from published environments and is reachable from ChatGPT on the web, mobile and desktop. Claude Code runs cloud sessions and, in the new projects beta, splits work into parallel threads that continue after you close your laptop.


