Head to head
Codex vs Claude Code: which to choose in 2026
Updated: · VibeStack by Modernitos · methodology
Contents
Claude Code (Anthropic) and OpenAI Codex are the two best-known AI coding agents: you describe a task, they read the repository, edit several files, run commands and tests, and propose a commit or a pull request. Both run in the terminal, in the IDE and in the cloud. The real differences are in what you pay, how usage is metered and how much you can customise the agent. Facts and prices checked on each official page on 22 November 2026.
Codex vs Claude Code at a glance
For daily terminal work
Claude Code
Vibe Coding
- Paid from
- Claude Pro $17/mo (annual) or $20/mo
- Free plan
- No: Claude Free does not include Claude Code
- Best for
- Long sessions, large repos, automation with hooks
If you already use ChatGPT
OpenAI Codex
Vibe Coding
- Paid from
- Included in ChatGPT; Pro from $100/mo
- Free plan
- Yes, limited (desktop app)
- Best for
- Cloud tasks and GitHub PR review
Prices from each official pricing page (linked in the sources below); taxes may apply.
Two agents, two business models
Claude Code is not sold separately. It is part of the Claude subscription from Pro upwards: the official comparison table lists Claude Code as "No" on Free and "Yes" on Pro, Max and Ultra. You can also use it with an Anthropic Console account and pay for API usage. According to the official docs it runs as a full CLI, as extensions for VS Code (and Cursor) and JetBrains, as a desktop app and on the web at claude.ai/code, including the iOS and Android apps.
Codex is included in every ChatGPT plan: Free, Go, Plus, Pro, Business, Edu and Enterprise. OpenAI says Free and Go are for quick or lightweight tasks in the desktop app (subject to rollout); Plus adds Codex on the web, in the CLI, in the IDE extension and on iOS, plus cloud integrations such as automatic code review and Slack. Pro comes in three tiers at $100, $200 or $500 a month. With an API key you can run Codex in the CLI, SDK or IDE extension, paying API prices, but without the cloud features.
Usage limits: how much work you get
Neither product promises a fixed number of messages. Both meter usage in 5-hour windows and weekly limits, and the real consumption depends on the model, the size of the repository and how long the task runs.
- Claude: Pro is the 1x baseline. Max gives 5x Pro usage every 5 hours and every week. Ultra removes the 5-hour limit for verified accounts and gives 10x Pro weekly usage. Max and Ultra also include $100 and $200 a month in API credits to build on the Claude Platform.
- Codex: OpenAI publishes estimates rather than limits. On Plus, for example, it estimates 15 to 160 local messages per 5 hours with GPT-6.1 Sol and 350 to 3,000 with GPT-6 Luna. Pro plans currently have no 5-hour limit. When you run out you can extend usage with ChatGPT credits.
How to compare limits fairly
Pick one real task from your backlog (for example "add tests to this module and fix what fails"), run it with each agent on the plan you would actually buy, and check the usage meter afterwards. Repeat it two or three times: a single run says little, because the same prompt can consume very different amounts.
Customisation and automation
This is where Claude Code goes further. Its docs describe a CLAUDE.md file with project rules (it can also read an existing AGENTS.md), automatic memory between sessions, skills to package repeatable workflows, hooks that run shell commands before or after each action, parallel subagents coordinated by a lead agent, MCP connections and scheduled tasks that run in the cloud even when your computer is off. It also plugs into GitHub Actions, GitLab CI/CD and Slack.
Codex also supports MCP, subagents and custom agents, and its cloud side (cloud chats, environments with setup scripts, internet access controls, GitHub code review and Slack and Linear integrations) is available from Plus. If your team already lives in ChatGPT, having the agent in the same subscription and the same admin console is a practical advantage.
Comparison table
| Item | Claude Code | OpenAI Codex |
|---|---|---|
| Free access | No (Claude Free does not include it) | Yes, limited, in the desktop app |
| Entry paid plan | Claude Pro $17/month (annual) or $20 monthly | ChatGPT Go / Plus: see official site |
| Heavy-use plans | Max $100, Ultra $200 | Pro $100, $200 or $500 |
| Surfaces | CLI, VS Code/Cursor, JetBrains, desktop, web, mobile | CLI, IDE extension, desktop, web, iOS |
| Project rules | CLAUDE.md (reads AGENTS.md), skills, hooks | requirements.toml config, subagents, custom agents |
| Pay per use | Anthropic Console / API | API key (no cloud features) |
Which one should you choose?
- Claude Code if you will spend hours a day in the terminal, want to encode your team rules in the repository (CLAUDE.md, hooks, skills) or need long sessions on a large codebase. Start with Pro and move to Max only if you hit the 5-hour limit often.
- Codex if you already pay for ChatGPT, want to try an agent without paying, or care most about delegating tasks to the cloud and getting automatic reviews on GitHub pull requests.
- Both can make sense in a team: for example, Codex for cloud tasks and PR reviews, and Claude Code for long local sessions. Test each one on the same tasks before paying for the higher tiers.
Related: Cursor vs Claude Code, Cursor vs Codex, Claude Code vs GitHub Copilot, Claude Code vs Factory, Cursor alternatives and the guide Cursor vs Windsurf vs Claude Code vs Copilot.
Frequently asked questions
Codex or Claude Code: which is better?
It depends on where you work and what you already pay for. Claude Code is more configurable for heavy terminal use (CLAUDE.md, hooks, skills, subagents and scheduled tasks). Codex fits better if you already have ChatGPT, because it is included, and it adds cloud tasks and automatic GitHub PR review from Plus.
How much does Claude Code cost?
It is not sold on its own: it comes with Claude Pro ($17/month billed annually, $200 up front, or $20 billed monthly), Max ($100/month) and Ultra ($200/month). The Claude Free plan does not include Claude Code. Prices exclude tax, per claude.com/pricing.
How much does Codex cost?
Codex is included in ChatGPT plans: Free and Go for light use, Plus with web, CLI, IDE extension and iOS, and Pro in three tiers at $100, $200 or $500 a month. Check the official ChatGPT site for Go and Plus USD prices. You can also use it with an API key and pay per use.
Can I try either one for free?
Codex, yes: ChatGPT Free allows quick tasks in the desktop app, subject to rollout. Claude Code has no free plan: you need Claude Pro or higher, or an Anthropic Console account with pay-as-you-go billing.
Which one has more generous usage limits?
Both meter usage in 5-hour and weekly windows. On Claude, Max gives 5x Pro usage and Ultra removes the 5-hour limit (verified accounts) with 10x Pro weekly usage. On Codex, Pro plans currently have no 5-hour limit, and Plus estimates, for example, 15 to 160 local messages every 5 hours with GPT-6.1 Sol.
Sources
Keep reading
Profiles and related reading
Claude Code profileOpenAI Codex profileCursor vs Windsurf vs Claude Code vs GitHub Copilot (2026): comparison and pricingBest vibe coding tools in 2026: a guide to choosing
More comparisons
Cursor vs Claude CodeCursor vs OpenAI CodexClaude Code vs GitHub CopilotClaude Code vs Factory (Droid)All →