AI

Codex vs Claude Code: Which AI Coding Agent Fits You?

OpenAI's Codex and Anthropic's Claude Code side by side: where each runs, what the plans cost, Git and permissions, and who should start where.

Two monitors on a walnut desk at night, the left showing OpenAI's Codex extension reviewing a code diff in VS Code and the right showing the Claude Code extension in VS Code.

OpenAI’s Codex and Anthropic’s Claude Code do the same basic job: you describe a change in plain English, and an AI coding agent reads your project, edits the files, runs commands and hands the result back for you to review. The bigger differences are in where each one runs, which subscription it comes with, and how it asks permission before touching your code.

This page puts the two side by side using only what OpenAI and Anthropic publish about their own products. It covers the ways you can use each agent, what the plans cost on the day we checked, how each one handles Git and permissions, and who should start with which. It is the coding-agent side of vibe coding, for people who want to keep and move the code rather than build inside a hosted app builder.

Before you read on. Neither OpenAI nor Anthropic pays us, and we have no partner link to either company. The plan details below were read from their official pages on November 30, 2026. We have not run both agents side by side on one project for this page, so you will not find a winner here, only what each company says its product does and costs.

Which one is for whom?

Codex suits people who already pay for ChatGPT or want a free way in; Claude Code suits people who already pay for Claude or want the terminal-first agent Anthropic built.

Codex is OpenAI’s coding agent. Its official page says “Codex is included in your ChatGPT plan” and describes “the same agent everywhere you code”: in ChatGPT, in the cloud, in an editor extension and in the terminal, all tied to your ChatGPT account. OpenAI’s pricing page lists Codex on every ChatGPT plan, including Free, though the free tier is limited (more on that below).

Claude Code is Anthropic’s coding agent. Anthropic describes it as an agent you hand “a bug fix, test, or multi-day migration” to, and says you can steer and review it from your desktop, terminal, IDE, Slack or the web. It needs a paid Claude plan or a pay-as-you-go developer account; the Free plan does not include it.

Both read a whole codebase, edit several files, run tests and open pull requests. Both work in VS Code and JetBrains editors. If you have no subscription yet, the plan you would actually use every day is a better tiebreaker than a feature list.

How does each one work?

Both run on your own computer, in an editor, or in the cloud; the difference is in which apps and accounts carry them.

Codex, per OpenAI’s Codex page, its pricing page and its IDE extension page, read on November 30, 2026:

  • Desktop app and ChatGPT. Codex runs inside the ChatGPT apps. On the Free and Go plans, the pricing page lists it only in the desktop app, “subject to rollout.”
  • CLI. A command-line version for your terminal, on Plus and higher plans or with an API key.
  • IDE extension. For VS Code, Cursor and Windsurf, with built-in integrations in Xcode and JetBrains IDEs.
  • Cloud. Tasks run in an OpenAI-managed workspace that “can keep working while your computer is asleep,” and you review the changed files, then commit or open a pull request.
  • Code review. On eligible plans, Codex can review pull requests on GitHub automatically.

Claude Code, per Anthropic’s product page and its documentation overview, read the same day:

  • Terminal. The original, full-featured CLI. Anthropic first released Claude Code on February 24, 2025, as “a command line tool for agentic coding” in a limited research preview, alongside the Claude 3.7 Sonnet model.
  • IDE extensions. For VS Code (the docs also link a Cursor install) and a plugin for JetBrains IDEs, which needs the CLI installed separately.
  • Desktop app. A Code tab in the Claude desktop app, with no separate install, on a paid plan.
  • Web and mobile. Cloud sessions at claude.ai/code and in the Claude mobile apps, running on infrastructure Anthropic manages.
  • Slack and CI. Team and Enterprise plans can mention @Claude in Slack and get a pull request back, and the docs describe running it in GitHub Actions or GitLab CI/CD.

Both read a project instruction file. Codex uses AGENTS.md. Claude Code uses CLAUDE.md, and its docs say it can read an existing AGENTS.md instead, which helps if you switch or use both.

What do Codex and Claude Code cost?

Both start at about $20 a month for an individual plan with coding included, and both bill heavy use through higher tiers or pay-per-token API access.

Prices below are in US dollars, as shown on each official page on November 30, 2026. If you are in the UK or the EU, your checkout may show a local price and VAT, so read the figure there before you pay. Plans and limits change often.

Codex, from the Codex page and the Codex pricing page:

Plan Price shown What the pages say about Codex
Free $0 Codex in the desktop app on a lighter model, subject to rollout
Go $8 Same as Free: “lightweight coding tasks” in the desktop app, subject to rollout
Plus $20 Web, CLI, IDE extension and iOS; automatic code review and Slack; “a few focused coding sessions each week”
Pro $100, $200 or $500 a month Higher limits; “Pro plans currently have no five-hour limit”
Business $20 per seat “2+ users, billed annually.” $25 per user per month when billed monthly
API key API pricing CLI, SDK or IDE extension; no cloud features such as GitHub code review or Slack

The Codex page shows Plus at $20 without saying how often it bills. ChatGPT’s own pricing FAQ says paid plans are “priced per user per month.” Usage on Plus is a shared allowance: the pricing page gives estimated ranges of local messages per five-hour window for each model, says they “are not fixed message limits,” and adds that weekly limits may also apply. When you run out, Plus and Pro users can buy extra credits, and anyone can keep working with an API key at standard API rates.

Claude Code, from Anthropic’s pricing page and the Claude Code page:

Plan Price shown What the pages say about Claude Code
Free $0 Claude Code not included
Pro $17 a month billed yearly ($200 up front), or $20 billed monthly Claude Code included; usage limits every five hours and every week
Max $100 a month “5x Pro usage every 5 hours and every week,” plus $100 a month in API credits
Ultra $200 a month No five-hour limit for verified accounts, “10x Pro usage every week,” plus $200 a month in API credits
Team $20 per seat a month, billed yearly Teams of 2 to 150, with “up to $500 per month in pooled API credits”
Console (API) account API pricing “Claude Code consumes API tokens at standard API pricing”

Anthropic’s pricing page notes that prices exclude applicable tax and that plans “are subject to change.” Cloud sessions count toward the same plan limits as the rest of your Claude use, and Anthropic’s docs say there is “no separate charge for the cloud VM.”

Subscription or API? A subscription gives you a predictable monthly bill and an allowance that resets. An API key or Console account bills each token. OpenAI’s pricing page pitches API keys at automation in shared environments such as CI, and per-token bills can climb on long sessions. If you are paying for this out of a side project, a subscription is easier to budget.

Where does your code live, and what can the agent touch?

Run locally, both agents work in a folder on your computer and ask before risky actions; run in the cloud, both clone your repository into a managed workspace and push changes back.

Codex. OpenAI’s approvals and security page says that, locally, “the agent runs with network access turned off” by default and uses an OS-enforced sandbox that limits writes to your current workspace. In its default preset, Codex can read, edit and run commands in the working folder on its own, and asks before editing files outside it or using the network. You can switch to read-only with /permissions. Codex’s cloud tasks run in OpenAI-managed environments connected to your GitHub or GitLab account, per its cloud page, and you choose when to commit or open a pull request. OpenAI’s IDE page also suggests creating Git checkpoints before and after a task.

Claude Code. Anthropic’s permissions documentation describes a tiered system: reading files needs no approval inside the working folder, while shell commands, file edits and web fetches ask first in the default mode, unless you allow them. Allow rules can be saved per repository and shared with a team through version control. An auto mode lets a classifier review actions instead of you; the product page says it “does not eliminate risk.” Claude Code works directly with Git: it stages changes, writes commit messages, creates branches and opens pull requests. Its cloud sessions run on Anthropic’s infrastructure, and cloning from Anthropic-hosted environments and opening pull requests require GitHub.

In both cases the code stays in your repository: on your disk when you work locally, and on GitHub (or GitLab, for Codex cloud) when you work in the cloud. Read each company’s data and training settings for your plan before you point either one at a client’s private code.

The safe habits are the same for both: work on a branch, commit before you hand over a task, read the diff, and keep API keys and passwords in environment settings, not in prompts. Our guide to what vibe coding still asks you to understand covers secrets, data and permissions in plain terms.

When is Cursor the better comparison?

When the real choice is between an agent you hand tasks to and an AI code editor you work inside all day, the question is Cursor vs Claude Code, not Codex vs Claude Code.

Cursor is an editor, so it sits on a different axis. Both official pages treat it as a place to run their agents: OpenAI lists Cursor among the editors for the Codex extension, and Anthropic’s docs link a Cursor install for the Claude Code extension. So you can use either agent inside Cursor. The comparison that matters is whether you want a terminal or cloud agent at all, or an editor with AI built in.

We mention Cursor next to both agents in our guides to making money with vibe coding and making a game with vibe coding, and the vibe coding hub shows how coding agents and app builders split the work. If you have never written code and want a live preview without installing anything, a prompt-to-app builder in the browser is often the easier start; the hub covers that side too.

Who should start where?

Start with the plan you already pay for, and switch only if its limits or way of working get in your way.

  • You already pay for ChatGPT Plus or Pro. Try Codex first. It is already in your plan, in the app, the CLI and the editor.
  • You already pay for Claude Pro or higher. Try Claude Code first, for the same reason.
  • You pay for neither and want to spend nothing. Codex is the only one of the two with a free entry on its pricing page, limited to the desktop app and subject to rollout. Claude Code’s free route is pay-per-token through a Console account, which is not free once you use it.
  • You live in the terminal. Both have a full CLI. Claude Code started there; Codex’s CLI comes with Plus and higher or an API key.
  • You want work to keep running with your laptop closed. Both offer cloud tasks on paid plans. Check whether your code is on GitHub, since Claude Code’s hosted cloud sessions need it.
  • You build for clients. Pick one, learn its permission settings properly, and put the plan in your costs. Our earnings-per-hour calculator shows what a fixed-price build pays once you count the subscription and the revisions, and our glossary entry on freelance work covers the basics of billing.

A coding agent is a tool, not a business. If you want to sell what you build, our guide to how to make money with vibe coding walks through the routes, and what AI agents can create and sell covers the kinds of apps and tools coding agents help make. If you would rather get paid without building software, the 50 ways to make money online is the wider list.

Books and courses

Pick the book or course for the agent you chose; learning both at once mostly teaches you two settings menus.

Partner link: we may earn a commission, at no extra cost to you. Disclosure

Build with Claude Code by Taeho Jo (Packt, 2026) builds a series of small projects with Claude Code, from a single webpage to an app with an API, a team of agents and a database-backed deployment. The publisher pitches it at readers with no prior programming experience, which makes it the gentler of the two.

Agentic Coding with OpenAI Codex CLI by Daniel Vaughan (Packt, 2026) is a long reference for using Codex in the terminal: AGENTS.md, approval modes and sandboxing, context and cost, and rolling it out across a team. It is written for developers and is more than most beginners need on day one.

For a guided course, Claude Code Beginner to Pro: Agentic Coding & Development on Udemy (by Tom Phillips, about 5.5 hours, last updated October 2026 when we checked on November 30, 2026) builds a full Next.js web app with Claude Code, including sign-in, a database and deployment. It expects some familiarity with web development and a Claude subscription. On the Codex side, Introduction to AI Coding with ChatGPT & Codex on Udemy (by Diego Davila and Anton Voroniuk, about two hours, updated November 2026) is aimed at complete beginners and builds small browser apps in the Codex app. It is new and had only a handful of ratings when we looked. It needs a ChatGPT plan that includes Codex. For free options, see our list of free AI courses.

FAQ

Is Codex free?

Partly. OpenAI’s Codex pricing page lists Codex on the Free plan, in the desktop app on a lighter model and subject to rollout. The CLI, IDE extension and cloud features start on Plus, which the Codex page showed at $20 on November 30, 2026.

Can I use Claude Code on Claude’s free plan?

No. Anthropic’s pricing page on November 30, 2026, listed Claude Code on Pro, Max, Ultra, Team and Enterprise, not Free. You can also use it with a Console account and pay per token at API rates.

Which is easier if I don’t know how to code?

Neither company sells its agent as a beginner app builder; both describe tools for working in a codebase. Codex’s free desktop entry costs nothing to try, and the Claude Code book above is written for beginners. A browser-based app builder is often simpler for a first project. See what vibe coding is for the difference.

Can I use both in the same editor?

Yes. OpenAI and Anthropic both publish extensions for VS Code and for JetBrains IDEs, and both list Cursor as an editor you can install them in. Each needs its own account and plan.

Is GitHub Copilot part of this comparison?

No. This page compares only Codex and Claude Code. If you are weighing either against an AI tool built into your editor, such as GitHub Copilot or Cursor, decide first whether you want an agent you hand tasks to or help inside the editor, then read that product’s official plan page.

Can I use an API key instead of a subscription?

Yes, for both. Codex’s pricing page says API-key sessions use separate API pricing and leave out cloud features such as GitHub code review. Claude Code with a Console account uses API tokens at standard API pricing.

Sources

Keep reading

Related guides