# Claude Code vs OpenAI Codex

> Claude Code vs OpenAI Codex: OpenAI Codex is our pick, leading for beginners and free plans. They split on last release and what the free plan allows. Verified.

![Claude Code logo](https://www.versusref.com/logos/claude-code.png) ![OpenAI Codex logo](https://www.versusref.com/logos/openai-codex.png)

This is the verified Claude Code vs OpenAI Codex breakdown: Claude Code (Terminal-first coding agent included in Claude Pro/Max/Team/Enterprise plans or billed via API; also IDE extension, desktop app and cloud sessions (cloud_agent).) and OpenAI Codex (Coding agent across CLI (Apache-2.0), IDE extension, Codex Cloud (cloud_agent) and ChatGPT desktop app; usage shared with ChatGPT Work. The standalone Codex app merged into the ChatGPT desktop app on 2026-07-09.) are AI coding agents platforms, priced from $17/mo and $0 + your model API bill respectively. The bottom line, head-to-head facts, and true cost tiers follow.

AI coding agents platforms · 38 facts compared · all sourced · pricing verified Oct 2, 2026

## Bottom line

OpenAI Codex takes four of seven use cases: Beginners, Free Plans, Local Models and Open Source. Its cheapest paid plan is $8/mo, and Claude Code starts at $20/mo. OpenAI Codex also offers a Free plan with GPT-6 Luna in the desktop app, while Claude Code is not included on the Free plan. The OpenAI Codex CLI is Apache-2.0 with 127,600 GitHub stars and runs local models, while Claude Code is proprietary. Claude Code still wins Enterprise, Terminal Workflows and VS Code, helped by its zero data retention option, a terminal CLI and checkpoints with rollback. For most buyers, the lower entry cost and open license tip the balance.

## Verdict summary

| Use case | Winner | Why |
| --- | --- | --- |
| Beginners | OpenAI Codex | For newer developers, a low entry price and a usable free plan matter most. |
| Enterprise | Claude Code | Both tools offer SOC 2, admin audit logs, SSO and a self-hosted or VPC deployment, so the deciding points are how code is handled and how firmly each claim is backed. |
| Free Plans | OpenAI Codex | What a free plan actually allows is the deciding factor here. |
| Local Models | OpenAI Codex | Running against models on your own machine is what matters most here, and only OpenAI Codex publishes local model support. |
| Open Source | OpenAI Codex | For teams that want to read or fork the agent, the license matters most. |
| Terminal Workflows | Claude Code | For shell-first developers, where the agent runs is the deciding factor. |
| VS Code | Claude Code | Editor support is close: Claude Code covers VS Code and Cursor through its VS Code extension and more, while OpenAI Codex covers VS Code, VS Code Insiders, Cursor and more. |

## Claude Code vs OpenAI Codex: head-to-head facts

| Fact | Claude Code | OpenAI Codex | Verified |
| --- | --- | --- | --- |
| How usage is metered | Time windows + per-token ([source](https://claude.com/pricing)) | Time windows + per-token ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| What the free plan allows | Claude Code not included on the Free plan ([source](https://claude.com/pricing)) | Free $0: 'GPT-6 Luna at Standard speed in the desktop app ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Cheapest paid plan (monthly) | $20 ([source](https://claude.com/pricing)) | $8 ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Top individual plan | $200 ([source](https://support.claude.com/en/articles/11049741-what-is-the-max-plan)) | $500 ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Usage included at entry tier | n/a | Plus ($20) ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Rate-limit window | Rolling five-hour session window + weekly limit ([source](https://claude.com/pricing)) | per five-hour period + weekly limits may apply ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Bring your own API key | true ([source](https://code.claude.com/docs/en/overview)) | true ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Models available | Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5 +1 more ([source](https://code.claude.com/docs/en/model-config)) | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, GPT-6 Luna +6 more ([source](https://developers.openai.com/codex/pricing)) | Oct 2 |
| Pick the model per task | ✓  Yes ([source](https://code.claude.com/docs/en/model-config)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/models)) | Oct 2 |
| Runs local models | n/a | ✓  Yes ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |
| Where it runs | Terminal CLI +9 more ([source](https://code.claude.com/docs/en/overview)) | ChatGPT desktop app ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |
| Autonomous multi-file edits | ✓  Yes ([source](https://code.claude.com/docs/en/overview)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/cloud.md)) | Oct 2 |
| Runs terminal commands | ✓  Yes ([source](https://code.claude.com/docs/en/permission-modes)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/agent-approvals-security.md)) | Oct 2 |
| Background / cloud agents | ✓  Yes ([source](https://code.claude.com/docs/en/claude-code-on-the-web)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/cloud.md)) | Oct 2 |
| Opens PRs from issues | ✓  Yes ([source](https://code.claude.com/docs/en/github-actions)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |
| MCP support | ✓  Yes ([source](https://code.claude.com/docs/en/mcp)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/extend/mcp.md)) | Oct 2 |
| Trains on your code? | Consumer (Free, Pro, Max): user choice ([source](https://code.claude.com/docs/en/data-usage)) | Business ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |
| Zero data retention option | ✓  Yes ([source](https://code.claude.com/docs/en/data-usage)) | n/a | Oct 2 |
| Self-hosted / VPC deployment | ✓  Yes ([source](https://code.claude.com/docs/en/self-hosted-environments-deploy)) | ✓  Yes ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |
| License | Proprietary ('SEE LICENSE IN README.md' on the npm package) ([source](https://www.npmjs.com/package/@anthropic-ai/claude-code)) | Apache-2.0 (Codex CLI) ([source](https://github.com/openai/codex)) | Oct 2 |
| Supported model providers | n/a | OpenAI (ChatGPT sign-in or API key), Azure OpenAI +5 more ([source](https://learn.chatgpt.com/docs/codex-manual.md)) | Oct 2 |

## Claude Code vs OpenAI Codex pricing: true cost at 3 usage tiers

Real monthly cost at 3 developer profiles: hobbyist (~5 h/week), full-time developer (~25 h/week of daily agent use), team of 5. Most vendors do not publish how much usage a plan covers, so the full-time row spans the cheapest to the top individual plan unless the vendor publishes its own guidance for daily users. Bring-your-own-key and open-source agents show the model bill you pay the provider, never $0.

| Volume | Buyer | Claude Code | OpenAI Codex | Note |
| --- | --- | --- | --- | --- |
| ~5 h/week of agent use | Hobbyist | $17/mo | Free with your own key; plans $8-$500/mo | Side projects and evenings. Priced at each vendor's cheapest paid plan (annual billing where offered), the tier every vendor sells for light use. |
| ~25 h/week, daily multi-file agent tasks | Full-time developer | $17-$200/mo | Free with your own key; plans $8-$500/mo | Daily agent use. Most vendors do not publish how much usage a plan covers, so this shows the span from the cheapest to the top individual plan; where a vendor publishes its own guidance for daily agent users, that figure is used instead. |
| 5 seats | Team of 5 | $125/mo | $125/mo | Priced from each vendor's own team plan: per-seat prices x 5, flat team plans as published. A tool with no published team price shows that rather than a guess. |

## Claude Code vs OpenAI Codex: verdicts by use case

### Beginners → OpenAI Codex

For newer developers, a low entry price and a usable free plan matter most. OpenAI Codex starts at $8/mo, while Claude Code starts at $20/mo. OpenAI Codex also has a free plan offering GPT-6 Luna at Standard speed in the desktop app, whereas Claude Code is not included on the Free plan. OpenAI Codex spells out entry-tier usage through its Plus plan, which Claude Code does not publish. Claude Code does publish checkpoints and rollback, a real safety net for undoing agent mistakes that OpenAI Codex does not publish. Even so, that easy undo is not enough to outweigh the cheaper start and the free plan.

### Enterprise → Claude Code

Both tools offer SOC 2, admin audit logs, SSO and a self-hosted or VPC deployment, so the deciding points are how code is handled and how firmly each claim is backed. Claude Code publishes a zero data retention option, which OpenAI Codex does not publish, and its self-hosted deployment is verified while OpenAI Codex's is vendor-claimed. On training, Claude Code describes user choice on consumer plans, while OpenAI Codex points to its Business tier. SSO comes on Team and Enterprise for Claude Code, and as SAML SSO with MFA on Business for OpenAI Codex. The zero retention option gives Claude Code the edge in a security review.

### Free Plans → OpenAI Codex

What a free plan actually allows is the deciding factor here. OpenAI Codex offers a $0 Free plan with GPT-6 Luna at Standard speed in the desktop app, while Claude Code is not included on the Free plan at all. Both support bringing your own API key, so that does not separate them. Once you pay, OpenAI Codex starts at $8/mo, while Claude Code starts at $20/mo. OpenAI Codex also runs local models, something Claude Code does not publish.

### Local Models → OpenAI Codex

Running against models on your own machine is what matters most here, and only OpenAI Codex publishes local model support. It also lists a range of model providers, including OpenAI via ChatGPT sign-in or API key and Azure OpenAI among others, while Claude Code does not publish its supported providers. On licensing, the OpenAI Codex CLI is Apache-2.0 and Claude Code is proprietary. Both let you bring your own API key.

### Open Source → OpenAI Codex

For teams that want to read or fork the agent, the license matters most. The OpenAI Codex CLI is Apache-2.0, while Claude Code is proprietary. OpenAI Codex also lists several model providers, including Azure OpenAI, and runs local models; Claude Code publishes neither. OpenAI Codex shows 127,600 GitHub stars, while Claude Code does not publish a star count.

### Terminal Workflows → Claude Code

For shell-first developers, where the agent runs is the deciding factor. Claude Code lists a terminal CLI among ten surfaces, while OpenAI Codex lists the ChatGPT desktop app as its surface. Beyond that, the two match: both run terminal commands, offer background or cloud agents, and support MCP. Both also read project rules files, CLAUDE.md for Claude Code and AGENTS.md for OpenAI Codex. With capabilities otherwise equal, the published terminal CLI decides it.

### VS Code → Claude Code

Editor support is close: Claude Code covers VS Code and Cursor through its VS Code extension and more, while OpenAI Codex covers VS Code, VS Code Insiders, Cursor and more. Both make autonomous multi-file edits. The difference is rollback. Claude Code publishes checkpoints and rollback, which OpenAI Codex does not, and that matters when an agent goes wrong inside the editor. OpenAI Codex does describe the usage included with its entry Plus plan, which Claude Code does not publish. Neither publishes codebase indexing.

## Claude Code vs OpenAI Codex: common questions

### Is Claude Code cheaper than OpenAI Codex?

Not at entry level. Claude Code's cheapest paid plan is $20/mo, or $17/mo billed annually. OpenAI Codex's cheapest paid plan is $8/mo. At the top end, the picture flips: Claude Code's top individual plan is $200/mo, compared with $500/mo for OpenAI Codex. Both list team plans at $25/user/mo.

### Claude Code vs OpenAI Codex: which is better for beginners?

OpenAI Codex is the easier start. Its cheapest paid plan is $8/mo, and Claude Code's is $20/mo. OpenAI Codex also offers a Free plan with GPT-6 Luna at Standard speed in the desktop app, whereas Claude Code is not included on the Free plan. Claude Code's advantage for beginners is its published checkpoints and rollback, an easy undo when the agent makes a mess.

### Is Claude Code or OpenAI Codex better for enterprise security reviews?

Both publish SOC 2, admin audit logs and a self-hosted or VPC deployment option. Claude Code adds a published zero data retention option and offers SSO on its Team and Enterprise plans. OpenAI Codex offers SAML SSO and MFA on its Business plan, though its self-hosted deployment is vendor-claimed rather than verified.

### Claude Code vs OpenAI Codex team plan pricing: how do they compare?

Both list a team plan at $25/user/mo, and both offer an Enterprise plan through contact sales.

### Is OpenAI Codex a good open source alternative to Claude Code?

The OpenAI Codex CLI is licensed under Apache-2.0 and has 127,600 GitHub stars, while Claude Code is proprietary. OpenAI Codex also publishes local model support, which Claude Code does not.

### What does the top plan cost for Claude Code vs OpenAI Codex?

The top individual plan costs $200/mo for Claude Code and $500/mo for OpenAI Codex. Beyond plan limits, Claude Code bills usage credits at standard API rates, while OpenAI Codex uses ChatGPT credits at per-1M-token rates.

### How do the rate limits work in Claude Code and OpenAI Codex?

Claude Code uses a rolling five-hour session window plus a weekly limit. OpenAI Codex meters per five-hour period, and weekly limits may also apply. Both meter usage with time windows plus per-token charges.

### Which models can I use in Claude Code?

Claude Code offers Claude Fable 5.1, Claude Opus 5.5 and Claude Sonnet 5.5 among its models, defaults to Claude Opus 5.5, and lets you pick the model for each task. It publishes a max context of 1,000,000 tokens.

### Does OpenAI Codex work with model providers other than OpenAI?

Yes. OpenAI Codex lists OpenAI through ChatGPT sign-in or an API key, Azure OpenAI and several more providers, and it supports bringing your own API key.

Source: https://www.versusref.com/coding-agents/claude-code-vs-openai-codex/
