Codex vs Claude Code: What I Learned Paying for Both

Brian Bojan Dordevic

About The Author

Brian Dordevic

Founder of Alpha Efficiency

From $4/hour virtual assistant to running a leading Chicago web design agency. I will help you occupy the minds of your ideal customers, improve your aesthetics, and increase sales.

Subscribe to Conversion Insider

I pay for Codex and Claude Code every month, and I still get the same question at least twice a week: which one should I actually use? Here's the answer I give over coffee, with the receipts.

Short version, for anyone comparing AI coding agents this year. Claude Code is the deeper tool. OpenAI Codex is the easier one to live with on a $20 plan. I keep both installed, my team at Alpha Efficiency keeps both installed, and I route tasks between them on purpose. If you only want one, skip to the pricing section and pick the tool whose limits fit your day.

Long version below. It covers the harness, the models, instructions and skills, sandboxing, Claude Code pricing against Codex pricing, the usage limits, and the questions people keep asking Google about this comparison. Everything here is as of September 2026, and both products ship something new most weeks, so treat the tables as a snapshot.

Provider usage panel showing Codex at 39 percent weekly usage, Claude at 14 percent current-session usage and 39 percent weekly usage, and Grok at 3 percent weekly usage
My usage panel on September 21, 2026. Codex and Claude Code sit at the same 39% of the week, and they got there doing very different work.

Codex vs Claude Code at a glance

What mattersClaude CodeCodex
Made byAnthropicOpenAI
ModelsOpus 5, Fable 5, Sonnet, HaikuGPT-5.6 Sol, plus a Fast mode
Instructions fileCLAUDE.md, walks up the directory treeAGENTS.md, walks down from the repo root
Entry planPro, $20, tight limitsChatGPT Plus, $20, real daily use
Real-volume planMax 5x at $100, Max 20x at $200Pro 5x at $100, Pro 20x at $200
Where it runsCLI first, then VS Code, JetBrains, web, desktop app, phone, SlackCLI, IDE extension, Codex Cloud, ChatGPT app, phone, Chrome extension
SandboxPermission prompts, hooks and an Auto mode classifierKernel level: Seatbelt on macOS, Landlock on Linux
ExtensibilitySkills, hooks, subagents, plugins, MCP serversSkills, MCP servers, Goal mode, integrations
Wins atLong sessions, judgment, custom workflowsCloud delegation, code review, cost per task

Product facts as of September 2026. Plan names and limits change often, so check the pricing pages linked in the sources before you buy.

Both started in the terminal. Neither stayed there.

A year ago this was a fight between two CLI tools, Codex CLI and Claude Code, built for developers who live in a terminal. You opened a shell, typed a prompt, and watched an agent edit files in your repo. That's still the core of both products, but the edges moved fast. Both have desktop apps and phone apps now. The difference is how much of the product lives there.

Codex is one piece of software spread across six surfaces: the CLI, an IDE extension for VS Code, Cursor, Windsurf and JetBrains, Codex Cloud for hosted runs, a sidebar inside the ChatGPT app, a phone app, and a Chrome extension. They share your ChatGPT account, your session history and your AGENTS.md. You can start a refactor on the train and finish it at your desk without losing the thread.

Claude Code is still CLI first. The web version at claude.ai/code arrived in October 2025, the desktop app and mobile push notifications followed, and Routines for cron and GitHub triggers shipped in April 2026. The terminal is the main surface and the cloud is a layer on top. If you live in a shell, that's the whole appeal. If you want to direct three agents from your phone while you walk, Codex has the more mature story.

The harness is the product. The model is the engine.

Every coding agent runs the same loop. Gather the conversation history, send it to the model with a set of tools, run whatever tool calls come back, add the output, repeat until the model stops asking for more. The loop is not where these two differ.

The difference is the unglamorous plumbing. What happens when a tool returns a giant output? What survives compaction? How does the agent remember what it did yesterday?

When an MCP server sends back a large response, Claude Code writes the full output to a file and reads from it as needed. Codex keeps the head and the tail and drops the middle. Most days that's fine. On a long build where the answer was in the middle, it isn't. When a session gets heavy, Claude Code's /compact squeezes the history down and reloads CLAUDE.md afterwards, so the rules come back with the memory. OpenAI went the other way and trained a Codex model specifically for compaction, so the model itself decides what to keep.

Composio's blog has the best example I've read. A developer ran a 26-hour session on a macOS app, hit 570K tokens, compacted down to about 10K, and went to bed. Eight hours later Opus explained a bug in the second panel by remembering what it had done to the first one. That's engineering memory surviving a 57-to-1 squeeze. Codex didn't hold that for him. I've seen the same pattern in my own sessions: Claude Code keeps the plot, Codex keeps moving.

Yes, the plumbing matters more than the benchmark. Two agents on the same model still behave differently, because the wrapper decides what the model gets to see. Pick the plumbing you can live with, then pick the model.

Models: Opus and Fable vs GPT-5.6 Sol

Claude Code ships with Anthropic's line: Opus 5 for hard judgment, Fable 5 when you want the frontier, Sonnet for everyday development and Haiku for the cheap subagent jobs. Codex runs GPT-5.6 Sol, with a Fast mode that OpenAI says streams up to 2.5 times quicker for double the price per token. Here's the AI model comparison in numbers, benchmarks first and real work second. SWE-bench, Terminal-Bench and the rest of the leaderboards move every month, so I'll skip those and stick to the two sources I trust.

On the Artificial Analysis index, Opus 5 scores 50 to 51 and streams around 54 to 61 tokens per second at $5 in and $25 out per million tokens. GPT-5.6 Sol scores 44 to 47, streams at 70 to 79 tokens per second, and costs $4 in and $20 out. I broke those numbers down, Grok included, in my post on paying $500 a month for AI and still hitting the limits. The short read: Claude is smarter per answer, Sol is faster per token, and neither number tells you how the day feels.

Composio's Golden Eval is closer to real work. Fable 5 inside Claude Code passed 47 of 47 scenarios. GPT-5.6 Sol High inside Codex passed 45 of 47, used about 19% fewer runtime tokens, finished 6% faster and made 27% more tool calls, so it iterates where Fable plans. On DeepSwe both hit a 69% pass rate, at $9.18 per task for Fable High and $3.47 for Sol High. Fable is the one you want when a wrong action costs you something. Sol is the one you want for volume.

Instructions, skills, hooks and subagents

Both tools read an instructions file cold at the start of every session, because neither has persistent memory by default. That file is where you set the agent's behavior, and where most "it ignored me" complaints start. Claude Code reads CLAUDE.md and walks up the directory tree to find parent files. Codex reads AGENTS.md and walks down from the repo root, so deeper files override shallower ones. In practice Codex makes it easier to know which rule won. Write imperatives, not observations. "Never use inline mocks" beats "we generally avoid inline mocks". Keep the file under roughly 200 lines. A bloated instructions file lowers obedience instead of raising it.

Skills are the on-demand version of the same idea. A SKILL.md sits dormant and loads only when a task matches, so it overrides the model's defaults without eating your context window. Anthropic released the standard openly, the same play they ran with MCP, and Codex adopted it. A skill you write in .claude/skills/ runs in Codex from .agents/skills/ with the Claude-only fields ignored. Most of the skills community still lives on Claude's side, though.

Past skills, the two tools split. Claude Code gives you hooks on 26 lifecycle events, so you can run a secret scan before every write, Prettier on every save, and a type check after every edit, in plain shell scripts. It gives you subagents with their own context window and tool permissions, a plugins marketplace since May 2026, multi-agent workflows that orchestrate dozens of subagents in one session, plan mode, worktrees and a headless flag for GitHub Actions and async jobs, the kind you kick off with an empty commit when nothing changed but you want the pipeline to run. That's the deepest extensibility stack on the platform side of this category, and it's also the most setup. What works for me is a short CLAUDE.md, three or four skills I actually use, and one hook that blocks writes to production.

Codex answers with things you'll reach for daily. /review drops a read-only code review into the thread. codex cloud exec sends a task to a hosted sandbox, and the attempts flag makes it take up to four swings at the same bug so you can pick the best one. Type @codex in a GitHub pull request comment and it picks up the change. On frontend work it opens its own browser, looks at what it built, iterates, and attaches a screenshot. It won't replace a designer or a real UI design process, but it gets a first pass in front of a human faster. Add Goal mode, profiles per project, and the Slack, Linear and GitHub integrations, and you get a tool that needs almost no custom tooling to be useful on day one. If your team is still weighing Rocket.Chat against Slack, note that both agents only talk to Slack.

Both speak MCP over stdio and streamable HTTP, so your MCP servers move between them without a rewrite. Most of my agentic sessions run with a dozen attached: Notion, Ahrefs, Railway, Slack, HubSpot. That's the part of the ecosystem that stopped being a differentiator this year. Firecrawl's June guide has a good side-by-side of the two extension models if you want the full feature grid.

Sandboxing: the kernel or the app layer

Both agents care about the model not doing something dumb to your machine. They stop it in different places.

Codex enforces the boundary at the kernel. On macOS it runs commands under Seatbelt, on Linux and WSL2 under Landlock and bubblewrap, on Windows in the native sandbox. You get three modes, read-only, workspace-write and danger-full-access, and the network is off by default, in your local environment and in the cloud. The operating system says no before the model gets a vote.

Claude Code enforces policy in the application layer. Permissions prompts gate each action, hooks let you script your own rules around every event, and Auto mode, which shipped in March 2026, uses a classifier to review tool calls instead of you approving each one. It's safer than the skip-permissions flag and more expressive than a kernel rule, but it isn't deterministic in the same way.

Here's how I choose. If a client codebase holds data that can't leak and I want a hard guarantee that the agent can't touch the network or files outside the workspace, Codex's model is what I want. If I want a custom chain that runs the linter, blocks a commit that fails the test suite, and posts to Slack when it ships, Claude Code's hooks are the knob. Safety and control aren't the same feature. That's the trade, and it's worth knowing which one you're buying.

Pricing and usage limits: which is cheaper, Claude Code or Codex?

The tiers line up almost suspiciously well.

TierClaude CodeCodex
Entry, $20Claude Pro. Light use, roughly 45 messages per 5-hour window.ChatGPT Plus. Meaningful daily runtime, and Codex also shows up on Free and Go with small caps.
Mid, $100Max 5x. About five times Pro.Pro 5x. About five times Plus.
Top, $200Max 20x. Shared between claude.ai chat and Claude Code.Pro 20x. Shared with the ChatGPT app and Codex Cloud.
Team and enterpriseSeats plus pooled usage, or API billing.Seats plus pooled usage, or API billing.

Plan names and message counts as of September 2026, from the Anthropic and OpenAI pricing pages and Composio's tests. Claude usage limits and Codex usage limits both run on rolling 5-hour windows plus a weekly cap, and both companies have changed the numbers mid-month without much warning.

The sticker price barely matters. What you're buying is agent time per dollar, and that's where they split. At the $20 floor, where most users live, ChatGPT Plus absorbs a normal day of coding-agent tasks. Claude Pro hits the wall by lunch. The credible-volume tier on the Claude side is the Claude Max plan, 5x at $100, and Anthropic's own support pages describe Pro as suited for light usage. Codex is cheaper to try. Both get expensive at scale, and the following section is where the real Claude Code cost hides.

Then there's tokens per task, which is the number that decides whether you stay inside your monthly limits. Firecrawl ran the same two prompts, a PR triage system and a real-time code review UI, through both tools on the same machine with the same MCP setup. Claude Code used about 192,000 tokens for around $2.50. Codex used 136,000 for about $2.04. That's a 1.4x token gap and a 23% cost gap, not the five-to-ten-times ratio you'll hear on Reddit. The extra tokens bought a more decomposed architecture and an unprompted smoke test. Whether that premium is worth 25% depends on how much your team cares about the code review that follows.

My own screenshot tells the same story from the user side. Codex and Claude Code both sat at 39% of the week on the same Sunday. Codex got there on long build loops with lots of tool calls. Claude Code got there on fewer, heavier sessions where I needed reasoning more than throughput. Same percentage, different days.

So, is Claude Max worth it? For me, yes, because the sessions where Opus holds a 500K-token thread and still remembers the second panel are the sessions that would have cost me a whole afternoon. If your work is high-volume, retry-friendly and mostly shipping, a $20 Plus plan with Codex will feel like the better deal and you won't miss much.

How I route work between them

The escape route from meter-watching is deciding up front which tool gets which job. Meter-watching is the newest reason a web development career feels stressful, and it's the most fixable one. Here's the default set my team runs on client work, and I'll change it the day one of them ships something that changes the math.

  • Long, tool-heavy sessions in a big codebase go to Claude Code on Opus. It keeps the context and the plot.
  • Steady build loops with a clear spec go to Codex on Sol. Fewer tokens, more attempts, faster stream.
  • Quick code review on a branch: Codex /review, every time.
  • Frontend work I want checked in a browser before the PR: Codex cloud, with the screenshot attached.
  • Anything that touches production data through several MCP servers: Claude Code with hooks blocking the writes I didn't approve.
  • Anything I start on my phone: Codex, because the state follows me to the desktop app.
  • Cheap subagent jobs, like summarizing a file or checking a path exists: Claude Code with Haiku as the model.

The usage limits stop hurting once the routing is deliberate. You stop burning a Max session on a task Codex would have finished in a $20 plan, and you stop asking Sol to hold a story it was going to forget.

Codex vs Claude Code FAQ

Which is cheaper, Claude Code or Codex?

Codex, at every tier that matches. The plans cost the same ($20, $100, $200), but Codex gives you more agent time per dollar, uses fewer tokens per task, and its $20 ChatGPT Plus plan covers a normal workday. Claude Code's $20 Pro plan is a light-use tier, and the real starting point is Max at $100.

Is there a better coding AI than Claude?

Better at what? On reliability and long-session memory, Claude with Opus and Fable is still the one to beat. On speed, cost per task and cloud delegation, Codex with GPT-5.6 Sol wins. If you want the best AI for coding in one sentence: Claude for the hard afternoon, Codex for the long week. Cursor and OpenCode belong on any list of the best AI coding tools too, but the frontier of agentic coding narrowed to these two in 2026, and the harness is why.

Is Codex good enough for coding?

Yes. It passed 45 of 47 scenarios in Composio's benchmark, matched Fable on DeepSwe at a third of the cost, and more than five million people use it every week. The gap you'll feel is in long sessions, where it drops the middle of large outputs and loses some architectural memory after compaction.

Does Codex use Claude Code?

No. Codex is OpenAI's coding agent, an open-source Rust binary that runs OpenAI models. Claude Code is Anthropic's, and runs Claude models. They share standards, like MCP servers and SKILL.md files, and you can point Codex at a skill written for Claude, but neither product runs the other.

Can I use both on the same repo?

Yes, and I do. Keep a CLAUDE.md and an AGENTS.md that say the same things, put shared skills where both can find them, and let each tool keep its own settings. The only thing to watch is that you don't run both on the same files at the same time. When one of them does mangle a branch, a force checkout is the fastest way back.

Try the routing for one week. Give Claude Code the hard afternoon, give Codex the long build and the review, and write down which sessions you'd pay for again. Keep it as a checklist, not a to-do list. That list is your answer, and it'll be more honest than any benchmark, including mine.

Sources

Portfolio

Fresh inspiration is a fingertip away,
Download Our Portfolio.

Download Our Portfolio