Build with AI · Comparison
Both tools can read your project, write code, and run commands for you. The real question is which one fits the plan you already pay for and the way you like to work.
Claude Code and Codex are the two big AI coding agents right now. Claude Code comes from Anthropic. Codex comes from OpenAI. Both can look at your files, make changes, and run commands while you watch.
I build software with AI tools every week, and people ask me which one to pick. So here is a plain answer. I checked every price and feature below on the official pages on October 20, 2026.
Quick answer
Pick Codex if you already pay for ChatGPT or want to try an AI coding agent for free, since Codex is included in ChatGPT plans, even Free and Go, with limits. Pick Claude Code if you already pay for Claude, since it is included in every paid Claude plan, starting with Pro at $17 a month billed yearly or $20 monthly. Both have heavy use plans from $100 a month. The best way to choose is to give both the same small task and keep the one whose work you like more.
What Claude Code and Codex are
Both tools are AI agents for code. You tell them what you want in plain words. They read your project, plan the change, edit files, and run commands like tests.
Anthropic describes Claude Code this way: "Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools." It runs in your terminal, your code editor, a desktop app, and the browser.
OpenAI describes the Codex command line tool like this: "Codex CLI is a coding agent from OpenAI that runs locally on your computer." Codex also works in your code editor, in the ChatGPT desktop app, and in the cloud, where tasks keep running after you close your laptop.

Price: what each one costs
Neither tool is sold on its own. You get each one through a plan you may already have. Here is what the official pages showed on October 20, 2026.
Claude Code pricing
- Free: $0, but Claude Code is not included. The plan table on claude.com shows Claude Code is not part of Free.
- Pro: $17 a month with the yearly discount ($200 billed up front), or $20 billed monthly. Claude Code is included.
- Max: from $100 a month, with 5x or 20x more usage than Pro.
Anthropic's pricing FAQ says it plainly: "Claude Code is included in all paid plans."

Codex pricing
- Free: $0. OpenAI's help center says "Codex is included across ChatGPT plans, including Free and Go." The ChatGPT pricing page calls it "Limited Codex access" on Free.
- Go: $8 a month for light coding tasks.
- Plus: $20 a month. This adds Codex on the web, in the command line, in your editor, and on iOS.
- Pro: from $100 a month, with plans at $100, $200, or $500.
- Business: $20 per user a month for 2 or more seats, billed yearly, on the openai.com Codex page.
One catch: Codex Cloud, where tasks run on OpenAI's computers, "is not included with Free or Go," per OpenAI's help center.

Usage limits: how much work you get
This is where most people get surprised. Both tools use limits that reset over time. Neither gives you a fixed number of messages.
Claude Code: Anthropic says "Every plan has usage limits that reset on a rolling five-hour session window, and paid plans add weekly limits on top." Your chats with Claude and your Claude Code work come out of the same pool. Pro gives "at least 5x more usage per 5-hour session than Free," and Max gives 5x or 20x the usage of Pro.
Codex: OpenAI's pricing docs show an estimated range of local messages per five hour period on Plus, and the range depends a lot on the model you pick. The same page says "Pro plans currently have no five-hour limit," and weekly limits may also apply. ChatGPT Work and Codex share usage.
When you hit a limit, both let you keep going for more money. Claude paid plans can turn on usage credits at API rates. ChatGPT Plus and Pro users can buy extra credits. Both tools also work with a pay as you go API key.
Setup: getting started with each
Setup is about the same for both. You install a small program, open your project folder, and sign in.
Claude Code setup
- Open a terminal. On a Mac or Linux, Anthropic's docs give this command:
curl -fsSL https://claude.ai/install.sh | bash - Go to your project folder and type
claude. - Log in with your Claude account when it asks.
Windows has its own command in the docs. You need a Claude subscription (Pro, Max, Team, or Enterprise), a Claude Console account, or access through a supported cloud provider.
Codex setup
- Open a terminal. OpenAI's GitHub page gives this Mac and Linux command:
curl -fsSL https://chatgpt.com/codex/install.sh | sh - You can also install it with npm:
npm install -g @openai/codex - Go to your project folder, type
codex, and choose Sign in with ChatGPT.
Prefer not to use a terminal? Both have other doors. Claude Code has a desktop app and a web version. Codex works inside the ChatGPT desktop app and on the web. For a full walkthrough of the Claude side, see my guide on how to use Claude Code.
The real differences that matter
1. Project notes files
Both tools read a notes file in your project, so you do not repeat yourself. Claude Code uses CLAUDE.md files. Codex uses AGENTS.md. In Codex, the /init command makes one for you. Write your rules there once, like use plain CSS or run the tests before you finish.
2. Open source or not
The Codex CLI code is open source. Its GitHub page says "This repository is licensed under the Apache-2.0 License." Claude Code is not open source in the same way. Its license file says use is subject to Anthropic's Commercial Terms of Service. For most beginners this does not change much. For some companies it matters.
3. Cloud tasks
Codex Cloud runs tasks on OpenAI's computers, and OpenAI says cloud tasks "can continue while your computer is asleep." Claude Code also has a web version and a --cloud option in its docs, so you can start work locally and keep going on your phone. Both have moved fast here, so check the docs for your plan.
4. The models underneath
Claude Code runs on Anthropic's Claude models. Codex runs on OpenAI's GPT models. Model names change every few months, so I will not crown a winner on model quality. The test below will tell you more than any chart.
My video: I compare Claude, Gemini, and GPT and talk about where each one is strong. It is about the models, not these two coding tools, but it will help you think about the choice.
Any results mentioned in videos are not typical and are not a promise of income. Your results depend on your work and your market.
How to pick: the one afternoon test
Here is how I would decide if I were starting today. It costs little or nothing if you already have one plan.
- Pick one small real task. For example: Add a contact form to my site that saves the name and email.
- Make a copy of your project. Or use Git, so you can undo anything.
- Give both tools the exact same prompt. Ask each one to make a plan first and wait for your OK.
- Judge the result, not the hype. Did it work? Was the plan easy to follow? Did it ask good questions?
- Check your usage page after. See how much of your limit the task used.
Keep the one that did better work for you. It is fine to use both. Some builders plan with one and review with the other. For a closer look at one of them, read my Claude Code review.
My Claude Code vs Codex test
Nothing you check here is sent or saved. Download it if you want to keep it.
Who should pick which
| If this is you | Start with |
|---|---|
| You want to try an AI coding agent for $0 | Codex (ChatGPT Free has limited Codex) |
| You already pay for ChatGPT Plus | Codex |
| You already pay for Claude Pro or Max | Claude Code |
| Your company needs open source tools you can inspect | Codex CLI |
| You code all day and keep hitting limits | Either heavy plan, from $100 a month |
My own summary, based on the official pricing pages checked October 20, 2026.
Comparing other tools too? See Cursor vs Claude Code and Claude Code pricing.
Want help building your first app with AI?
In my free workshop, I show how regular people use AI tools to plan, build, and launch simple software, step by step.
Join my free AI workshopFree to join. No credit card needed.
Frequently asked questions
Is Codex better than Claude Code?
Neither one wins for everyone. Codex is included in ChatGPT plans, even Free with limits. Claude Code is included in paid Claude plans. Give both the same small task and keep the one whose work you like more.
Is Codex free?
Codex is included in ChatGPT Free and Go with limits, per OpenAI's help center, checked October 20, 2026. Codex Cloud is not included with Free or Go.
Is Claude Code free?
No. Claude Code is included in paid Claude plans. Pro is $17 a month billed yearly or $20 billed monthly, checked October 20, 2026. The Free plan does not include it.
Can I use Claude Code and Codex together?
Yes. They are separate tools, so you can install both. Some builders plan with one and review with the other. Use Git so you can undo changes.
What is the difference between CLAUDE.md and AGENTS.md?
They do the same job for different tools. Claude Code reads CLAUDE.md files and Codex reads AGENTS.md. Both hold your project rules so you do not have to repeat them.
Do I need to know how to code to use them?
It helps, but you can start without it. Both tools explain what they change. Start with small tasks, ask them to plan first, and test everything yourself.
Sources
Checked October 20, 2026. Plans, prices, and rules can change.


