OpenAI Codex vs Claude Code: Which AI Coding Agent Is Better? (2026)

An illustration in 1980s Japanese city-pop style: a man relaxes beside two laptops writing code in a sunny poolside home office

Updated November 1, 2026 · Rebuilt with current plans and models, and two tests we ran ourselves

Two AI coding agents, one Mac, the same two jobs. What each costs, what it runs on, and which one we’d pick.

The short version: Codex (OpenAI) and Claude Code (Anthropic) are AI coding agents: you describe what you want, and they read your files, write the code and run it. Codex now comes with every ChatGPT plan, including a limited free version, and runs GPT-6.1 Sol on paid plans. Claude Code starts with the $20 Claude Pro plan and runs Opus 5.5 by default. In our two tests on the same Mac, both fixed a bug the same way, but only Claude Code’s tip calculator got the money exactly right.

What are Codex and Claude Code?

Both are AI agents for writing software. A chatbot hands you code to copy; an agent opens your project, makes the changes, runs the code and checks the result, asking before anything risky. You don’t need to be a programmer: describing what you want in plain words and letting the AI build it is what people call vibe coding.

OpenAI Codex

OpenAI's Codex page at openai.com/codex
OpenAI’s Codex page offers a Mac download or the web version. Our screenshot, November 1, 2026.

Codex is OpenAI’s coding agent. It comes in a desktop app (Mac and Windows), a terminal app (the text-only command window programmers type into), add-ons for code editors such as VS Code and Cursor, and Codex Cloud, which works on OpenAI’s own computers so you can hand it a job and come back later. In the ChatGPT desktop app you pick ChatGPT or Codex, and ChatGPT itself has two modes, Chat and Work.

Its models are GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna. OpenAI describes Sol as near-Astra performance at a lower cost, and its sample settings use it. See our GPT-6 Sol and Luna explainer for what those names mean.

Claude Code

Anthropic's Claude Code page at claude.com
Claude Code’s page lists the terminal, web, phone, GitHub, VS Code, JetBrains and Slack. Our screenshot, November 1, 2026.

Claude Code is Anthropic’s coding agent. It started as a terminal tool and now also runs in a desktop app, in VS Code and JetBrains editors, on the web at claude.ai/code, from the Claude phone apps and in Slack (Anthropic’s overview lists them all).

It uses Claude Opus 5.5 by default, and you can switch to Sonnet 5.5, Haiku 5.5 or Fable 5.1. New to it? Start with what Claude Code is and how to install it.

We gave both the same two jobs. What happened?

We ran both on the same Mac on November 1, 2026, in an empty test folder, with nothing connected to our accounts beyond the normal sign-in. We used each tool’s fast, low-cost model to match what a beginner on a basic plan would use:

  • Claude Code 2.1.316 with Claude Haiku 5.5.
  • Codex 0.146 with GPT-5.6 Luna. Our version of Codex refused every GPT-6 model with a “not supported” message, and only the older GPT-5.6 models would run. OpenAI’s docs say at least one of its newest models, GPT-6.1 Terra, needs Codex 0.159 or later, so update yours before you start.

Test 1: build a tip calculator

What we asked both
Create a single file called index.html: a tip calculator that splits a restaurant bill between friends. Inputs: the bill amount, the tip percentage (buttons for 15%, 18% and 20%, plus a custom box) and the number of people. Show the tip, the total and what each person pays, rounded up to the next cent so the bill is always covered. Plain HTML, CSS and JavaScript in that one file, no libraries, and it should look good on a phone.
Side by side on a phone screen: the tip calculators Codex and Claude Code built, both splitting an $87.40 bill with an 18% tip between three people. Codex shows $34.39 each; Claude Code shows $34.38 each
Test 1: build a tip calculator. Same request, same bill. Codex’s page looks more polished but charges each person a cent too much; Claude Code’s is plainer and gets the money right. Image: Beginners in AI test, November 1, 2026.

Codex finished in 35 seconds and Claude Code in 48. Codex’s page is the better-looking one. But we typed an $87.40 bill with an 18% tip for three people, and Codex charged each person $34.39, so the group pays $103.17 when $103.14 covers the bill. Its code rounds twice, and a tiny error in how computers store decimals pushes the second rounding up a cent. Claude Code worked in whole cents and charged $34.38 each, exactly enough.

From our testClaude Code also told us, without being asked, that it had checked its rounding on six sample bills but had not looked at the page in a browser. A note like that shows you exactly what is left to check.

Test 2: fix a bug

We wrote a small shopping-cart file where the code SAVE10 should take 10% off orders over $50 whether the customer types it in capitals or not, plus four small automatic checks (tests). Two of them failed, because the code only accepted SAVE10 in capitals.

What we asked both
Some tests in test_cart.py fail. Find and fix the bug in cart.py (don't change the tests), run the tests to confirm they pass, then explain the fix in two plain sentences.
Side by side: Codex and Claude Code each change one line of cart.py the same way and all four tests pass
Test 2: fix a bug. Both found it and made the identical one-line change. Claude Code explained more. Image: Beginners in AI test, November 1, 2026.

Both found the bug, changed the same single line, left the tests alone and got all four passing. Codex took 14 seconds and gave a one-sentence summary. Claude Code took 19 seconds and explained what was wrong, what it changed and which tests had failed before.

Our takeaway: for a small, clear fix, both did the job. On the build, Codex (on its older model) made a money mistake you would only catch by checking the numbers. Whichever you use, test the result yourself.

How do they compare side by side?

Plans and features from each company’s own pages, November 1, 2026.

OpenAI CodexClaude Code
Made byOpenAIAnthropic
Cheapest way inFree or Go ($8): GPT-6 Luna only, as it rolls outClaude Pro, $20 a month ($17 billed yearly). Not on the free plan
Main paid planChatGPT Plus, $20: GPT-6.1 Sol, plus Astra, Terra and LunaClaude Pro, $20: Opus 5.5 by default
Top plansPro from $100 (no five-hour limit)Max $100, Ultra $200 (no five-hour limit)
ModelsGPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 LunaOpus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.1
Where it runsDesktop app, terminal, code editors, Codex Cloud on the webTerminal, desktop app, code editors, web, iPhone and Android, Slack
Works in the cloud while you’re awayYes, Codex CloudYes, Claude Code on the web
Instructions file (your standing notes for it)AGENTS.mdCLAUDE.md (it can read AGENTS.md too)
Connects to other toolsMCP (a standard way to plug in other apps), plugins, skills and hooksMCP, plugins, skills and hooks
Open source?The terminal app is (free to reuse under the Apache 2.0 license); the editor add-on and Cloud are notNo
Usage limitsEstimated per five hours, plus weekly limitsEvery five hours and every week

What does each cost?

Codex is included in every ChatGPT plan. Free and Go ($8 a month) get GPT-6 Luna in the desktop app as it rolls out. Plus ($20) adds GPT-6.1 Sol, and Pro (from $100) removes the five-hour limit. OpenAI’s estimate for Plus is 15 to 160 Sol messages every five hours, depending on how big they are, with weekly limits on top. More on the plans in ChatGPT pricing.

Claude Code needs a paid Claude plan: Pro at $20 a month ($17 billed yearly), Max at $100 for five times Pro’s usage, or Ultra at $200 with no five-hour limit for verified accounts. The free Claude plan doesn’t include it. Our Claude Code pricing guide goes deeper.

Building your own app on the models? Prices are per million tokens (a token is about three-quarters of a word): GPT-6.1 Sol costs $2 to read and $10 to write, and Claude Opus 5.5 costs $4 and $20. Both companies sell cheaper models too.

How careful are they with your files?

Both ask before doing anything risky, and both let you choose how much freedom to give. Codex has three sandbox settings (limits on what it may touch): read-only, allowed to change files in your project, or full access. OpenAI recommends its “Auto” setting, which lets it change files in your project and asks before anything more, for projects saved in Git (a tool that keeps every version so you can undo changes). Claude Code has permission modes too: Manual (it asks before edits and commands), “accept file edits”, a plan-only mode that proposes changes without making them, and an auto mode with safety checks.

For a first project, stay in the most careful mode and work in a copy of your files.

Which should you choose?

  • You already pay for ChatGPT: try Codex first. It costs you nothing extra.
  • You want to try one for free: Codex, on the free ChatGPT plan, once it reaches your account.
  • You already pay for Claude: Claude Code is included with Pro and up. Our beginner’s guide walks you through a first project.
  • You want clear explanations of what changed: Claude Code explained more in our test.
  • You want to hand off a job and walk away: both now have a cloud version that keeps working while your computer is off.
  • You’re comparing more tools: see Claude Code vs Cursor vs Copilot.

Plenty of people use both, paying $20 a month for each and letting one check the other’s work.

What changed since this page was written?

  • Codex moved from GPT-5.4 and GPT-5.3-Codex to the GPT-6 family. OpenAI retired the older models for ChatGPT sign-ins between August and October 2026.
  • Codex reached the free ChatGPT plan, with GPT-6 Luna.
  • Claude Code moved from Opus 4.6 to Opus 5.5, and a $200 Ultra plan with no five-hour limit arrived.
  • Both added cloud versions that keep working without your computer.
  • Codex’s open-source terminal app passed 132,000 stars (bookmarks) on GitHub, the code-sharing site.

Frequently asked questions

Is Codex better than Claude Code?

Neither wins everything. In our tests they tied on a bug fix, and Claude Code got the arithmetic right on the build where Codex didn’t. Each company publishes its own benchmark results, and they use different tests, so those numbers don’t settle it.

Is Codex free?

Partly. OpenAI includes Codex with the free ChatGPT plan, limited to the GPT-6 Luna model and rolling out gradually. Paid plans get more models and more use.

Is Claude Code free?

No. It needs Claude Pro ($20 a month, or $17 billed yearly) or a higher plan.

Can I use Codex and Claude Code together?

Yes. They work on the same files, so some people ask one to write code and the other to review it. Keep instructions in an AGENTS.md file, which both can read.

Which is better for beginners?

Both are fine for a first project if you use the desktop app and the careful settings. Codex is easier to try if you already have ChatGPT; Claude Code explained its work more clearly in our test. Start with what Claude Code is or our GPT-6 guide.

Do they work offline?

Not with their usual models. Both run GPT and Claude models on the company’s servers, so you need an internet connection, even when the files stay on your computer. Codex’s terminal app can be pointed at a free open model running on your own computer (through Ollama or LM Studio), but that is an advanced setup with weaker models.

Made for regular people, by a real person

AI coding tools and everything else in AI, explained in plain English every day. Curated and edited by a human.

Free forever. Unsubscribe anytime.

Beginners in AI free community on Skool: learn AI in fourteen days, master it in 30, one small win a day, zero experience needed

You May Also Like

Sources

Last reviewed: November 1, 2026. Plans and models change often; check each company’s page before you subscribe.