If you're comparing these two by name, you're probably already deep into evaluating AI coding agents and trying to figure out which lab's tool fits how you build software, not just which one has the flashier demo. I run Claude Code every working day on client automation projects. For Codex, I've gone deep on OpenAI's own documentation, the GitHub repo, and its pricing pages as a practitioner doing real evaluation work, not as someone who's shipped months of production code through it the way I have with Claude Code. I'll keep that split visible throughout this post, the same way I did in my Cursor vs Claude Code comparison and my Lovable vs Bolt writeup: informed research on one side, daily production mileage on the other, and I won't blur the two.
The core difference: a product umbrella vs a focused terminal agent
This comparison is trickier than Cursor vs Claude Code because both of these are, at their core, CLI-based coding agents. The real difference is in scope.
As of July 2026, "OpenAI Codex" isn't one tool. It's a product umbrella spanning four surfaces. There's Codex CLI, a local terminal agent written in Rust that you install directly and that inspects, edits, and runs code against your local repository. There's Codex Cloud, a background agent reached from the ChatGPT web app at chatgpt.com/codex, from GitHub via @codex mentions, from Linear, or from Slack, which runs each task in its own isolated cloud sandbox preloaded with your repo and can open GitHub pull requests. There's an IDE extension for VS Code, Cursor, and Windsurf, plus native integrations inside JetBrains IDEs (added in January 2026, per OpenAI's docs) and Xcode. And there's a Desktop app, which secondary sources report OpenAI merged into the ChatGPT macOS app in July 2026, though I couldn't independently verify that specific merge against a primary OpenAI page, so treat it as reported rather than confirmed. All four surfaces share the same ChatGPT-plan usage limits and can authenticate through ChatGPT login or an OpenAI API key.
Claude Code is architecturally simpler: it's Anthropic's official CLI coding agent, full stop. The recommended install path is the native binary installer (curl or irm one-liners for macOS, Linux, Windows, and WSL), which skips the Node.js requirement entirely; the alternative is the npm package @anthropic-ai/claude-code, which needs Node 22+. I've laid out the exact commands for both paths at installing Claude Code. It runs in your terminal, reads and edits files, runs shell commands and your test suite, uses git, and asks for permission before anything risky. It ships a VS Code extension and a JetBrains plugin for people who want it visible inside an editor, but those are secondary surfaces layered on top of one core product, not a separate cloud-hosted product line with its own name and its own trigger channels the way Codex Cloud is.
So the framing that holds up: Codex is a family of related products under one brand, with the CLI as just one entry point among several. Claude Code is one product, the terminal agent, that happens to also show up inside a couple of editors.
Pricing: Codex vs Claude Code, plan by plan
Both companies price their entry tiers close together and diverge hard at the top. Here's every confirmed number as of July 2026.
| Plan | Price | What it includes |
|---|---|---|
| Codex Free | $0/mo | Limited, trial-level access for quick coding tasks via the ChatGPT web app, VS Code extension, CLI, and iOS. Excludes cloud-based GitHub code review and Slack integration. Exact rate limits not published. |
| Codex Go | $8/mo | "Lightweight coding tasks." Exact rate limits not published. |
| Codex Plus | $20/mo | Full web/CLI/IDE/iOS access plus cloud tasks and code review. Baseline usage in the 5-hour rolling window runs roughly 15-90 local messages on the flagship Sol model, 20-110 on the balanced Terra model, or 50-280 on the fast Luna model, shared between cloud tasks and local CLI messages. |
| Codex Pro (5x) | $100/mo | 5x Plus's rate limits: roughly 75-450 (Sol), 100-550 (Terra), or 250-1,400 (Luna) local messages per 5-hour window. |
| Codex Pro (20x) | $200/mo | 20x Plus's rate limits: roughly 300-1,800 (Sol), 400-2,200 (Terra), or 1,000-5,600 (Luna) per 5-hour window. |
| Codex Business | $20/user/mo billed annually (minimum 2 users), or $25/user/mo billed monthly | Same rate-limit tier as Plus, plus cloud features, GitHub/Slack/Linear integrations, and admin controls. |
| Codex Enterprise / Edu | Custom | Enterprise-grade security and admin controls, no fixed Codex rate limits. |
| Claude Code Free | Not included | The free Claude.ai plan does not include Claude Code at all. |
| Claude Code Pro | $17/mo billed annually, or $20/mo month-to-month | Claude Code access alongside your Claude.ai Pro plan. |
| Claude Code Max 5x | $100/mo | Higher usage ceiling for regular daily use. |
| Claude Code Max 20x | $200/mo | Highest consumer usage ceiling. |
| Claude Code Team | $20-25/mo (Standard) up to $100-125/mo (Premium), per seat | Seat-based pricing for teams. |
| Claude Code API (pay-as-you-go) | Metered per token | Anthropic's own cost documentation reports averaging around $13 per active developer day, roughly $150-250/month for regular use. |
A couple of things worth being precise about. OpenAI's rate-limit numbers above come from the pricing documentation's tables for Plus and Pro specifically (Business is documented as sharing Plus's rate-limit tier rather than having its own published numeric table); the Free and Go tiers don't have published numeric limits, so don't assume they're generous just because there's no table to check. Both Pro sub-tiers, 5x and 20x, also come with access to a gpt-5.3-codex-spark research preview, a perk the pricing page attaches to the Pro plan generally rather than to the 20x tier alone. On the Codex side, usage inside a ChatGPT plan is metered by that shared 5-hour rolling window per model tier, and cloud tasks and local CLI or IDE messages draw from the same pool, while GitHub-integrated code review is tracked as a separate limit. Image-generation turns inside a Codex session burn through that allowance 3-5x faster than text-only turns. Plus and Pro users who run out can buy additional usage credits without upgrading their plan.
For the full breakdown of what each Claude Code tier includes, including real monthly cost scenarios and how to keep API spend down, see Claude Code pricing.
Both tools also have standalone, token-metered API paths outside their consumer plans. OpenAI's API price list puts the Codex-specific model, GPT-5.3-Codex, at $1.75 per million input tokens, $0.175 per million cached input tokens, and $14 per million output tokens; the general-purpose GPT-5.6 family used inside ChatGPT plans is priced separately (Sol at $5/$0.50/$30, Terra at $2.50/$0.25/$15, Luna at $1/$0.10/$6 per million tokens, with Sol's pricing roughly doubling above a 272K-token breakpoint). Anthropic's Claude Sonnet 5 runs $2/$10 per million input/output tokens through an introductory window ending August 31, 2026, then $3/$15 standard after that. Whether GPT-5.3-Codex is actually what powers ChatGPT-plan Codex Cloud and CLI sessions, versus the GPT-5.6 family being the sole in-product models, isn't fully disambiguated in OpenAI's own docs, so I'd treat that API-listed model as a separate developer-facing SKU rather than assuming it's identical to what you get inside a ChatGPT subscription.
How each one handles autonomous and background work
This is where the "product umbrella vs one product" difference shows up in your day-to-day workflow, and it's worth separating two different ideas: autonomous edits happening locally in front of you, versus tasks running in the background somewhere else while you do other things.
Codex Cloud is purpose-built for the second one. Each task you kick off gets its own isolated cloud sandbox, preloaded with your repository, so you can queue up multiple tasks and have them run in parallel without one interfering with another. When a task finishes, Codex can open a GitHub pull request directly, or you can review the diff and summary first and ask for follow-up changes before anything lands. You can kick off a task from four different places: the ChatGPT web app, an @codex mention in a GitHub PR or issue comment, a Linear issue or comment, or a Slack thread. Locally, Codex CLI runs inside a Landlock/seccomp sandbox on macOS and Linux, matching the environment its models were trained in; on native Windows, the sandbox is an AppContainer-based implementation still labeled experimental, and OpenAI's own materials point developers toward WSL2 for production-grade sandboxing on Windows instead. Codex also supports MCP for connecting external tools, lets you pick a model and reasoning effort per task, and can delegate focused sub-tasks to a cheaper model like GPT-5.4-mini and fold the results back into the main session.
Claude Code's documented autonomy is centered on the first idea: a local, permission-gated agent working directly in your repo. It reads files, writes and edits code, runs shell commands and your test suite, and uses git, asking for confirmation before anything destructive. Because it's a CLI rather than a hosted product with its own trigger channels, the way you get "background" behavior out of it is by scripting it yourself, wiring it into a cron job, a pre-commit hook, or a CI pipeline, rather than pointing it at a dedicated cloud dashboard with parallel isolated sandboxes and multi-channel triggers built in. If what you specifically want is a hosted, multi-channel background-task product with PR creation baked into the core offering, that's a more developed part of Codex's product line on paper than anything documented for Claude Code. If what you want is a single, scriptable local agent you can point at any workflow you build yourself, Claude Code's simplicity is the feature, not a gap.
Who each one is for
Codex makes the most sense if you're already paying for ChatGPT, or if you specifically want a background-task workflow that plugs into GitHub, Linear, or Slack without you having to build that plumbing yourself. The Free and Go tiers give you a genuinely low-friction on-ramp, since you're likely testing it against an account you already have. If your team lives in Linear tickets and GitHub PRs and you want an agent that shows up in both natively, Codex's multi-channel design is doing real work for you out of the box.
Claude Code makes the most sense if you want a single, fast, scriptable terminal agent that isn't tied to any one vendor's chat product, and that you can wire into whatever automation you're already running, CI, cron, git hooks, or a plain shell prompt. There's no free tier, which is a true cost of entry compared to Codex's $0 Free plan, but the tradeoff is a tool built by Anthropic specifically around one job: being a terminal-native coding agent, not a chat app that grew a coding feature.
To be straight about where I sit: Claude Code is what I run every working day on client automation and web-app builds, which is the lens the rest of my writing on this site comes from. My read on Codex here comes from a genuine research pass through OpenAI's own docs, its pricing pages, and its GitHub repo, not from months of shipping client work through it the way I can honestly claim for Claude Code. If you're choosing based on raw capability for your specific repo, I'd trial both against a real task before committing a subscription tier to either one.
Sources
Codex facts and pricing (research conducted as of 2026-07-15; most recent Codex model and CLI updates found dated July 9-10, 2026):
- developers.openai.com/codex/cli (redirects to learn.chatgpt.com/docs/codex/cli)
- developers.openai.com/codex/cloud (redirects to learn.chatgpt.com/docs/cloud)
- developers.openai.com/codex/pricing (redirects to learn.chatgpt.com/docs/pricing)
- developers.openai.com/codex/ide (redirects to learn.chatgpt.com/docs/codex/ide)
- developers.openai.com/api/docs/pricing
- github.com/openai/codex
- help.openai.com/en/articles/20001106-codex-rate-card (returned HTTP 403 on direct fetch, referenced only via search snippet, not independently re-verified)
- chatgpt.com/pricing (direct fetch also returned 403, verified instead via learn.chatgpt.com/docs/pricing and search snippets)
Claude Code facts and pricing (as of July 2026):
- claude.com/pricing
- code.claude.com/docs/en/costs (source for the roughly $13 per active developer day API cost figure)
- this site's own Claude Code pricing breakdown and Claude Code install guide
Codex is a fast-moving, multi-surface product, and several details above (Free and Go rate limits, the reported ChatGPT desktop app merge, native Windows sandbox maturity) are flagged as unconfirmed or hedged for a reason. Check OpenAI's live docs before you commit a subscription tier based on any single number here.
If you're trying to figure out which of these agents fits how your team ships software, or you want help wiring one of them into a real production workflow instead of just running a trial task against a toy repo, book a 30-minute call and we can talk through it.
Frequently asked questions
Is Codex better than Claude Code?
Not in a universal sense: they're both serious agentic coding CLIs from major labs, and the right pick depends on your ecosystem and workflow. Codex is bundled inside a ChatGPT plan a lot of developers already pay for and adds a genuinely wider set of surfaces (cloud background tasks, GitHub/Linear/Slack triggers, native JetBrains and Xcode integrations). Claude Code is a narrower, terminal-first agent with no free tier, but it's the one I run every day in shipped client work, while my read on Codex comes from research and docs rather than months of daily use, so weigh my Codex take accordingly.
How much does Codex cost vs Claude Code?
Codex runs Free at $0, Go at $8/month, Plus at $20/month, Pro from $100/month (5x limits) to $200/month (20x limits), and Business at $20/user/month billed annually (minimum 2 users) or $25/user/month billed monthly. Claude Code has no free tier: Pro is $17/month billed annually or $20/month month-to-month, Max runs $100 or $200/month, and Team seats run $20 to $25/month (Standard) up to $100 to $125/month (Premium). At the entry level Codex's Free and Go tiers undercut Claude Code, but both tools converge near $20/month at their standard individual tier and scale to the same $100 to $200 prosumer ceiling.
Is Codex free with ChatGPT?
Yes, in a limited way. ChatGPT's Free plan ($0/month) includes trial-level access to Codex for quick coding tasks through the web app, the VS Code extension, the CLI, and iOS, per OpenAI's own pricing documentation. It excludes cloud-based GitHub code review and Slack integration, and OpenAI hasn't published exact numeric rate limits for the Free tier.
Can I use Codex from the terminal?
Yes. Codex CLI is a local terminal agent written in Rust that you install with npm (`npm install -g @openai/codex`), Homebrew (`brew install --cask codex`), a platform install script, or a manual binary download from GitHub Releases, and it inspects, edits, and runs code directly against your local repository. macOS and Linux get a full Landlock/seccomp sandbox; native Windows support uses an experimental AppContainer-based sandbox, with WSL2 recommended for production-grade use.
Which is better for autonomous coding tasks?
It depends on whether you mean local autonomous edits or hosted background tasks. For background delegation, Codex Cloud is the more built-out product on paper: each task runs in its own isolated cloud sandbox preloaded with your repo, multiple tasks can run in parallel, it can open GitHub pull requests, and you can trigger tasks from the ChatGPT web app, a GitHub comment, Linear, or Slack. Claude Code's documented core is a local, permission-gated agent that reads, edits, and runs code and git commands directly in your repo, which you can script into your own CI or cron automation, a different shape than a hosted multi-channel background-task product.
Is Codex or Claude Code better for beginners?
Codex has the lower-friction on-ramp for a beginner because its Free plan is $0 and it's bundled with a ChatGPT account many people already have, with an $8/month Go tier for lightweight tasks above that. Claude Code has no free tier at all, since the free Claude.ai plan doesn't include it, so a beginner needs to commit to at least a $17 to $20/month Pro plan or a funded API account before trying it. Both are still terminal-first tools once you're past the entry screen, so neither one skips the command-line learning curve entirely.