Two Agents, One Terminal, and a Decision You Don't Have to Overthink
When I started using AI coding agents seriously, I did what most people do. I opened two tabs, read two pricing pages, and tried to find the one line that would tell me which tool was better. There isn't one. Codex vs Claude Code is not a fight with a winner. It's a choice between two good tools that were built by two different companies with two different ideas about how a coding agent should behave.
I've used both on real projects now — small websites, automation scripts, the kind of work a solo builder actually does — and the honest answer is that the difference that matters is rarely the model. It's the workflow. Which subscription you already pay for, how much you care about sandbox safety, whether you want to delegate tasks to the cloud while you do something else, and how long your sessions run. This guide covers all of that, with the prices and facts I checked in November 2026. Both tools change fast, so I'll say where each fact comes from and what to double-check before you pay.
Codex vs Claude Code at a Glance
If you only have two minutes, this is the whole comparison in one place.
- Codex (OpenAI). The coding agent inside your ChatGPT plan. Runs in a terminal (CLI), an IDE extension, the ChatGPT desktop app, on the web through Codex Cloud, and on iOS. Default model GPT-6.1 Sol for complex coding, with GPT-6 Astra and GPT-6 Luna available. The CLI is open source under the Apache-2.0 licence. Its local sandbox is on by default, with network access off. Project instructions live in an AGENTS.md file.
- Claude Code (Anthropic). The coding agent inside your Claude plan. Runs in a terminal, VS Code and JetBrains extensions, the Claude desktop app, on the web, and on mobile. Default model Opus 5.5 on paid plans and the API, with Sonnet 5.5, Haiku 5.5, and Fable 5.2 available. Project instructions live in a CLAUDE.md file, and it also reads AGENTS.md if that's what your project has. The source is proprietary, not open source. Its sandbox is available for shell commands but off by default.
- Entry price. Both start at $20 a month — ChatGPT Plus for Codex, Claude Pro for Claude Code. Codex has a limited free tier on the Free and $8 Go plans, inside the desktop app only. Claude Code has no free tier at all; the free Claude plan doesn't include it.
- Heavy-use price. ChatGPT Pro runs $100, $200, or $500 a month. Claude Max is $100 a month and Ultra is $200 a month. Both families give you more usage as you pay more, and both have five-hour usage windows on the cheaper plans.
- The one-line difference. Codex is the safer default for handing a task to a machine and walking away. Claude Code is the stronger default for long, hands-on sessions inside your own terminal.
What Codex Actually Is
Codex is OpenAI's coding agent, and it's worth saying plainly what that means: you don't buy Codex on its own. It comes with your ChatGPT plan, the same way Claude Code comes with your Claude plan. The plan you already pay for decides what you can do with it, and that's the first thing to check before you compare anything else.
On ChatGPT Plus at $20 a month, you get the full Codex product: the CLI in your terminal, the IDE extension, Codex on the web, the iOS app, and cloud tasks that run on OpenAI's machines. You also get automatic code review on GitHub pull requests and a Slack integration. OpenAI estimates 15 to 160 local messages per five-hour window on GPT-6.1 Sol for Plus users, and 350 to 3,000 on GPT-6 Luna, the lighter model. Those are estimates, not fixed limits, and your real limits show up in the usage dashboard or by running /status in the CLI.
On the Free and Go plans, Codex is much narrower. You get quick, lightweight coding tasks with GPT-6 Luna at Standard speed inside the ChatGPT desktop app, subject to rollout. No CLI, no IDE extension, no web access, no cloud tasks. It's a taster, not a tool you can build on. If you're a student, it's worth knowing that eligible US university students could claim $100 in Codex credits, which is the most genuinely free route OpenAI offered — check whether that offer is still running before you count on it.
ChatGPT Pro comes in three tiers: $100, $200, and $500 a month, billed monthly only. All three currently have no five-hour usage limit in Codex, which is the main reason to pay for them, and the $500 tier adds an Ultrafast mode. In late October 2026, OpenAI doubled the Work and Codex allowance on the Pro 100 and Pro 500 plans and cancelled a planned cut to Pro 200, so the tiers moved around recently. If you read an older guide that says Pro is a single $200 plan, it's out of date.
There are two things about Codex that genuinely set it apart. The first is the sandbox. When Codex runs a command on your machine, it runs inside a sandbox by default, with network access switched off unless you allow it. That matters more than it sounds. An agent that can run shell commands is an agent that can delete files, install things, and reach the internet. Codex's default is to keep that caged until you say otherwise. The second is the open-source CLI. You can read the source, fork it, and run it with an OpenAI API key instead of a ChatGPT sign-in, paying per token. That route skips the subscription-only cloud features, but for scripted automation and CI jobs, paying per token is often the honest way to price the work.
Codex also supports the extension points you'd expect: MCP servers, skills, plugins, hooks across 12 lifecycle events, and subagents. And it reads AGENTS.md, the instruction file that tools like Cursor and Aider also use, so if your project already has one, Codex picks it up without any setup.
What Claude Code Actually Is
Claude Code is Anthropic's coding agent, and it follows the same bundled model: it comes with your Claude plan. The free plan doesn't include it, so the cheapest way in is Claude Pro at $20 a month, or $17 a month billed yearly. I covered the full price list in my Claude Code pricing guide, but the short version is Pro at $20, Max at $100, Ultra at $200, and Team at $25 per seat a month. Max gives you five times Pro's usage, Ultra gives you ten times the weekly usage and, once your account is verified, removes the five-hour session limit entirely.
The default model is Opus 5.5 on Pro, Max, Team, Enterprise, and the API. That's the strongest Claude model for most coding work, and it's the one most sessions run on. Sonnet 5.5 is the workhorse you switch to when you want to save usage, Haiku 5.5 is the cheap option for simple, high-volume jobs, and Fable 5.2 is Anthropic's newest agentic model, released in November 2026. All four list a 1-million-token context window as of November 2026, which is a lot of room for a large codebase. If you'd rather pay per token than subscribe, the API charges $2 per million input tokens and $10 per million output tokens for Sonnet 5.5, $4 and $20 for Opus 5.5, $0.10 and $0.50 for Haiku 5.5, and $8 and $40 for Fable 5.2.
Claude Code runs where you already work. The terminal is its home, but the VS Code and JetBrains extensions put it inside your editor, the desktop app and web give you cloud sessions, and the mobile app lets you monitor a session from your phone. One feature I use more than I expected is the ability to pull a cloud session into your terminal mid-task, so a job that started on Anthropic's machines can finish on yours.
Where Claude Code pulls ahead of Codex is in extension points. It has hooks across 33 lifecycle events — Codex has 12 — plus output styles, dynamic workflows, and a wider choice of cloud providers if you run it through the API: Anthropic's own API, Bedrock, Vertex, or Foundry. It also reads AGENTS.md when a project has no CLAUDE.md, which makes switching between the two agents less painful than you'd think. And its code review works differently: you can ask for a review of your branch on any plan, while automatic review on pull requests is limited to Team and Enterprise, with @claude on GitHub Actions as the do-it-yourself route.
The trade-off is the sandbox. Claude Code's sandbox for shell commands exists, but it's off by default. That means the agent runs commands in your real environment unless you switch it on. For a careful user that's fine — you read what it plans to run before you approve it — but it's the opposite default to Codex, and the opposite default matters most on the days you're tired and clicking approve without reading.
Codex vs Claude Code Pricing: What You Really Pay
Both agents cost $20 a month to start, and both get expensive in the same way: by selling you more usage, not a better tool. The tool doesn't change when you upgrade. The room does. That's the sentence that should decide your spending, so let me put the two price ladders side by side.
- $0 — Codex only, and barely. ChatGPT Free and Go ($8 a month) include Codex in the desktop app with GPT-6 Luna at Standard speed, subject to rollout. No CLI, no IDE, no cloud. Claude Code has no free tier. If you have no budget at all, Codex is the only one you can try.
- $20 a month — the honest starting point for both. ChatGPT Plus gets you full Codex: CLI, IDE, web, iOS, cloud tasks, GitHub review. Claude Pro gets you full Claude Code: terminal, editor, desktop, web, mobile. Pro also has a yearly option at $17 a month, which saves $36 a year. Plus has no annual discount. Both have five-hour usage windows and weekly limits at this tier.
- $100 a month — when $20 keeps running out. ChatGPT Pro 100 gives you about ten times Plus's Codex allowance and currently no five-hour limit. Claude Max at $100 gives you five times Pro's usage, every five hours and every week, plus $100 a month in API credits. One warning from my pricing guide, because it's the most expensive misunderstanding in this whole space: those Max API credits pay for the Claude API, the Agent SDK, and the Console Playground. They do not pay for Claude Code sessions. Don't buy Max for the credits expecting free coding sessions.
- $200 a month — for agents running all day. ChatGPT Pro 200 gives you about twenty times Plus's allowance. Claude Ultra gives you ten times Pro's weekly usage and removes the five-hour limit once your account is verified, which is what makes long overnight runs possible. Ultra used to be called Max 20x; Anthropic renamed it on October 30, 2026, and kept the price.
- $500 a month — Codex only. ChatGPT Pro 500 gives you about fifty times Plus's allowance plus Ultrafast mode. Claude Code has no equivalent tier. If you're running agents all week, every week, this is the top of the ladder.
- Teams. ChatGPT Business is $20 per user a month billed annually, or $25 monthly, with Premium seats at $100 or $125 a month for five times the usage. Claude Team is $25 per seat a month, or $20 billed yearly. Both give every seat the coding agent, and both add admin controls. The team decision is usually about which chat product your company already uses, not about the coding agent.
- Pay per token. Both agents can run on an API key instead of a subscription: Codex on an OpenAI API key, Claude Code on a Claude Console key or a cloud provider. This is the right route for automation, CI jobs, and spiky use, because you pay for what you use and there are no session caps. It's the wrong route if you just want to sit down and build, because a subscription is simpler and the bill is flat.
One more pricing fact worth knowing before you choose. Starting in December 2026, OpenAI says the usage allowance on Plus, Pro, and Business plans will be shared across ChatGPT and Codex, measured in tokens. That means heavy chatting and heavy coding draw from the same pool. Claude Code already shares its plan's limits with the Claude chat app. In practice, both vendors are moving to the same idea: one allowance, everything you do counts against it.
Where the Two Agents Feel Different in Daily Use
Feature tables make Codex vs Claude Code look almost identical, and on paper they nearly are. Both read a repository, edit files, run commands, and open pull requests. The differences show up in the third hour of a real session, when the novelty has worn off. Here's what I've actually felt.
Starting a task. Codex feels like delegating. You describe the job, it goes to a sandbox — local or in the cloud — and comes back with a result. Claude Code feels like pairing. It works in your terminal, in your files, with your tools, and you watch it think. Neither is better in the abstract. Delegating suits a job you can describe completely in two paragraphs. Pairing suits a job you'll need to steer halfway through.
Long sessions. This is where the limits bite. On the $20 plans, both agents measure usage in rolling five-hour windows, and a long afternoon of heavy building can run dry before dinner. Claude Code's Ultra removes that wall once your account is verified, and ChatGPT's Pro tiers currently have no five-hour limit at all. If your sessions regularly run past five hours, the $100 tier is where the wall moves, whichever agent you pick.
Safety. Codex's sandbox-on-by-default is the safer starting point, especially if you're new to agents. Claude Code's six permission modes give you finer control once you know what you're doing, and its approval prompts are more granular per tool. The practical rule is simple: if you tend to approve without reading, Codex's default protects you more. If you read every prompt and want control, Claude Code's modes are the better fit.
Cloud tasks. Codex Cloud runs tasks on OpenAI's machines from the web, and you can fire off several at once and check on them later. Claude Code has cloud sessions too, and self-hosted environments for them were in beta on Team and Enterprise as of November 2026. For a solo builder, Codex's cloud feels a little more finished. For a team with its own infrastructure, Claude Code's self-hosted option is the one to watch.
Code review. Both agents review code, but the plumbing differs. Codex gives you automatic review on GitHub pull requests from Plus, plus a /review command that ranks issues by priority without changing your files. Claude Code gives you a /code-review command on every plan, and automatic review is limited to Team and Enterprise, with @claude through GitHub Actions if you set it up yourself. If pull-request review is the main reason you're buying, Codex includes it sooner and cheaper.
Instruction files. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and falls back to AGENTS.md when there is no CLAUDE.md. In practice, I keep both files in my projects now, or just AGENTS.md, since both agents understand it. The file is a small thing, but it's where the agent learns your rules — which framework you use, how you name things, what never to touch. Write it once, and both agents get smarter.
Which One Writes Better Code?
This is the question everyone asks, and it's the one I can't answer with a number. I haven't run a benchmark, and I won't invent one. The public benchmarks that do exist — SWE-bench, Terminal-bench, and the review datasets some companies publish — change every time a new model ships, and both vendors ship new models every few weeks. A benchmark from October can be wrong by November. GPT-5.5 was retired from Codex for ChatGPT sign-ins on October 14, 2026, and Anthropic renamed Max 20x to Ultra two weeks later. That's how fast this space moves.
What I can say from using both is that the model matters less than the prompt. If you're weighing Codex vs Claude Code purely on code quality, stop — the deciding factor is your prompting, not the model. — "make my website better" — and you'll get vague, mediocre code. Give either agent a specific job with a test step — "add a contact form that validates email addresses, and check it by submitting the form three times" — and you'll get good code from both. The gap between a clear instruction and a vague one is bigger than the gap between GPT-6.1 Sol and Opus 5.5.
There is one real difference in how the models behave. GPT-6.1 Sol, Codex's recommended model, is a reasoning-heavy model, and it shows on refactors that need careful thought across many files. Opus 5.5, Claude Code's default, is strong on long agentic sessions where the agent has to keep track of a large codebase and a long plan. Those are tendencies, not rules, and your own project will tell you which one it prefers faster than any benchmark will. Run the same real job on both during a free or cheap month, and trust what you see.
Codex vs Claude Code for Beginners
If you're starting from zero and you don't code for a living, the answer is simpler than the comparison makes it look. Pick the one that's already included in a subscription you pay for. If you have ChatGPT Plus, start with Codex. If you have Claude Pro, start with Claude Code. The $20 you're already spending is the cheapest $20 in this whole decision, and both agents are good enough that the subscription you already own beats the subscription you don't.
If you pay for neither, Codex has the edge for one reason: the free tier. It's limited to the desktop app with GPT-6 Luna, but it's a real way to try an agentic coding tool without paying anything, and you can upgrade to Plus when you hit the wall. Claude Code needs Pro from day one, which is fine if you're sure, but it's a worse way to try before you buy.
Once you're inside either tool, the beginner experience is similar. Both agents work best when you give them small jobs first: fix one bug, add one feature, write one script. Both will happily build you something large and wrong if you ask for too much at once. My rule for the first week is the same for both: one job, one test, check the result yourself before moving on. The agent is not a developer you hired. It's a fast junior who needs you to check its work.
One more beginner note. If you're building with AI to earn — a landing page for a client, a small automation, a digital product — the tool matters less than the workflow around it. That's exactly what the AI Agent Starter Kit is for: plug-and-play agent setups you can use for first builds and first client jobs, instead of figuring out the whole pipeline from scratch. Start with the kit's smallest workflow, deliver one real job, and then decide whether you need a bigger plan.
Codex vs Claude Code for Teams
Teams choose differently from individuals, because the question stops being "which agent is better" and becomes "which one can we manage". Both vendors have an answer, and both answers are priced around $20 to $25 per user a month.
ChatGPT Business gives you Codex with team workspace controls, larger cloud machines, and the option to buy credits when the included usage runs out. Business data isn't used for training by default. Premium seats cost $100 a month billed annually and get five times the usage. Enterprise is custom pricing, with the heaviest admin controls.
Claude Team gives you Claude Code with a shared workspace, controls over who can do what, and a bit more usage per seat than Pro. Enterprise adds security and compliance features, and self-hosted environments for cloud sessions were in beta on Team and Enterprise as of November 2026.
The honest team advice is the same as the beginner advice, scaled up: standardise on the chat product your team already uses. If your company lives in ChatGPT, Codex is already there, and adding a second vendor just for the coding agent buys you a comparison, not a capability. If your company lives in Claude, the same logic runs the other way. The exception is a team that genuinely needs both models — some teams run Codex for review and Claude Code for building, or the reverse — and both tools are cheap enough at $20 a seat that running both for a month to find out is a reasonable experiment, not a waste.
Three Mistakes People Make Choosing Between Codex and Claude Code
Picking by benchmark score. Benchmarks are real, but they're snapshots of a moving target. A model that wins in October can lose in November, and the benchmark task is never your task. The only test that matters is your own project, run on both tools, judged by whether the code works. Everything else is marketing with footnotes.
Paying $100 or $200 on day one. I understand the impulse. If the $20 plan is good, the $200 plan must be ten times as good. It isn't. It's the same tool with more room, and room you can't use until your jobs get bigger. Start on the $20 plan. Let the limits tell you when to move up. They will, clearly, and exactly when it matters.
Forgetting the subscription you already pay for. This is the most common mistake, and the most expensive. People buy a second $20 subscription to try the other agent, then keep paying for both out of inertia. If you already pay for ChatGPT Plus or Claude Pro, the agent inside that plan is your starting point. Try the other one for a month if you're curious, then cancel the one you don't use. Two $20 subscriptions is $480 a year. That's a lot of money for a comparison you could have finished in a week.
Questions People Ask About Codex vs Claude Code
Is Codex free? Partly. ChatGPT Free and Go include Codex in the desktop app with GPT-6 Luna at Standard speed, subject to rollout. The full product — CLI, IDE extension, web, iOS, cloud tasks — starts at ChatGPT Plus, $20 a month.
Is Claude Code free? No. The free Claude plan doesn't include it. The cheapest way in is Claude Pro at $20 a month, or $17 a month billed yearly.
Can I use both at the same time? Yes, and some people do. They share the AGENTS.md instruction file, so a project set up for one mostly works with the other. The cost is two subscriptions, so it's worth deciding after a month of trying both, not as a permanent setup.
Which one is better for code review? Codex includes automatic review on GitHub pull requests from the $20 Plus plan. Claude Code's automatic review is limited to Team and Enterprise, though you can run a review on any plan with the /code-review command or set up @claude with GitHub Actions. If review is your main use, Codex includes it sooner.
Which one is safer to run? Codex, by default. Its sandbox is on with network access off, so a bad command stays caged unless you allow it. Claude Code's sandbox exists but is off by default, so you need to switch it on and read the approval prompts. Both are safe in careful hands. Codex is safer in tired hands.
Do I need to know how to code? Not to start. Both agents are built for people who can describe what they want in plain words. But you do need to check the result. An agent can write a form that looks right and fails silently, and only someone who tests it will catch that. The skill that matters isn't coding. It's testing.
Will the prices change? Yes, probably. Both vendors have changed their plans in the last month alone — OpenAI doubled Pro allowances in late October, Anthropic renamed Max 20x to Ultra on October 30. Check the official pricing page before you subscribe, not a guide, including this one.
The Short Version
Codex vs Claude Code comes down to three questions. Which subscription do you already pay for? Do you want a sandbox that's on by default, or finer permission controls you switch on yourself? And do you want to delegate tasks to the cloud, or pair with an agent in your own terminal? If you already pay for ChatGPT Plus, start with Codex. If you already pay for Claude Pro, start with Claude Code. If you pay for neither and want to try before you buy, Codex's limited free tier is the only free door. Start on the $20 plan either way, and upgrade only when the limits interrupt your real work most weeks.
The tool won't make you a developer. But the right agent, given clear jobs and checked properly, will do in an afternoon what used to take you a week. That's the real prize, and it's available on either side of this comparison. If you want the workflows that turn that speed into income, the AI Agent Starter Kit has the agent setups I use for first builds and first client jobs, and the free AI Creator Prompt Pack gives you 64 prompts to practise with before you spend anything.
Keep Reading
Two guides that go with this one:
- Claude Code for Beginners: Build Your First AI Agent in a Weekend — how to build your first working agent once you've picked your tool.
- How to Make Money with Claude Code in 2026 (Without Being a Developer) — four ways to turn the skill into income, so the subscription pays for itself.