Codex vs Claude Code comes down to what you already pay for: OpenAI's Codex is the better buy if you use ChatGPT or want an open-source CLI and local models, and Anthropic's Claude Code is better if you want the cheaper main plan, Claude Pro at £18 a month including VAT, and the top independent benchmark score. Both read your project, edit files and run commands from plain-English instructions, in the terminal, your editor, a desktop app and the cloud. Meta has a rival in Muse Code, its terminal agent.
Key facts
- Cheapest way in (UK, 29 October 2026): Codex with ChatGPT Free (limited); Claude Code from Claude Pro, £18 a month including VAT.
- Main plans: ChatGPT Plus £20 and Claude Pro £18 a month; ChatGPT Pro from £89 and Claude Max from £90.
- Models: Codex runs only OpenAI models, with GPT-6.1 Sol as OpenAI's pick on paid plans; Claude Code runs only Anthropic models and defaults to Opus 5.5.
- Open source: the Codex CLI is Apache 2.0; Claude Code's licence reads "All rights reserved".
- Benchmark: on Terminal-Bench 4.0, Claude Code with Opus 5.5 scores 64.8% and Codex with GPT-6.1 Sol 58.2%, at about a seventh of the run cost.
- Windows: Codex has a native Windows sandbox; Claude Code's sandbox needs WSL2.
- Training: both can train on personal-plan sessions unless you opt out; neither does on business plans by default.
On this page
- Codex vs Claude Code: which is better?
- What are Codex and Claude Code?
- Codex and Claude Code side by side
- How much do Codex and Claude Code cost in the UK?
- How do the usage limits compare?
- Which models do they use, and which scores higher?
- Is Codex open source? Is Claude Code?
- How do sandboxing and approvals differ?
- Do both support MCP, skills, plugins, hooks and subagents?
- Cloud tasks and GitHub: which does more?
- Do Codex and Claude Code train on your code?
- Claude Code vs Codex: which should you choose?
- Frequently asked questions
- Read next
- Sources and dates checked
Codex vs Claude Code: which is better?
Neither wins outright. Claude Code leads Terminal-Bench 4.0, an independent leaderboard that tests both agents, and its main plan costs £2 a month less in the UK. Codex is cheaper to try, more open, better on Windows and the only one of the two that officially runs local models.
Both come inside a chat subscription, so the real question is which subscription to keep. If you already pay for one, its agent costs nothing extra.
For eight agents side by side, see my AI coding agents comparison. For installing each, see my guides to Claude Code and OpenAI Codex.
What are Codex and Claude Code?
Both are AI coding agents. You describe a job in plain English, and the agent reads your code, edits files, runs commands and tests, and reports back. They differ more in licence and safety model than in what they do.
- OpenAI Codex: the open-source Codex CLI, an extension for VS Code, Cursor and Windsurf, integrations in JetBrains IDEs and Xcode, the ChatGPT desktop app (Mac, Windows, Linux in preview) and Codex Cloud on the web and iPhone.
- Anthropic's Claude Code: a terminal tool, VS Code and JetBrains extensions, the Claude desktop app (Mac, Windows, Linux in beta) and cloud sessions in a browser or phone.
Both run on Mac, Windows and Linux. Anthropic asks for macOS 13, Windows 10 version 1809 or Ubuntu 20.04 or later, with 4 GB of RAM. OpenAI's README lists macOS and Linux builds plus a Windows installer.


Codex and Claude Code side by side
This table sets the official facts next to each other, as of 29 October 2026. UK prices are what each company showed UK visitors that day.
| OpenAI Codex | Claude Code | |
|---|---|---|
| Cheapest plan with it | ChatGPT Free (limited, desktop app only) | Claude Pro, £18 a month including VAT |
| Main personal plan | ChatGPT Plus, £20 a month | Claude Pro, £18 a month or £180 a year |
| Models | OpenAI only: GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra, GPT-6 Luna | Anthropic only: Opus 5.5 (default), Sonnet 5.5, Haiku 5.5, Fable 5.1 |
| CLI licence | Open source, Apache 2.0 | Proprietary, "All rights reserved" |
| Default safety | OS sandbox, network off, asks before leaving the workspace | Auto mode: a classifier model reviews actions |
| Sandbox on native Windows | Yes | No, use WSL2 |
| Local models | Supported in the CLI with --oss (Ollama, LM Studio) | Not supported by Anthropic |
| Automated GitHub PR review | From Plus, by tagging @codex | Code Review on Team and Enterprise |
| Training on personal plans | Opt-out available | Opt-out |
How much do Codex and Claude Code cost in the UK?
Codex comes with every ChatGPT plan, from Free, and Claude Code with every paid Claude plan, from Pro at £18 a month including VAT. I checked both UK pricing pages on 29 October 2026.
| Plan | UK price, billed monthly | Billed yearly | What you get |
|---|---|---|---|
| ChatGPT Free | £0 | - | Limited Codex, desktop app, GPT-6 Luna |
| ChatGPT Go | £7 | - | Limited Codex; may include ads |
| ChatGPT Plus | £20 | - | Full Codex, cloud tasks, GitHub review |
| ChatGPT Pro | From £89 | - | Three usage tiers; no five-hour limit for now |
| ChatGPT Business | £18 a seat | £15 a seat | Two seats minimum; no training by default |
| Claude Pro | £18 | £15 a month (£180) | Claude Code with Opus |
| Claude Max | From £90 | - | 5x or 20x Pro usage |
| Claude Team Standard | £22.50 a seat | £18 a seat | 2-150 seats; no training by default |
| Claude Team Premium | £113 a seat | £90 a seat | 5x a Standard seat |

On VAT, Anthropic's UK page says "Prices include 20% VAT". OpenAI's page shows pound prices but does not say either way, so check the checkout total. For a five-person team on monthly billing, ChatGPT Business comes to £90 a month and Claude Team Standard to £112.50.
Both also take pay-as-you-go API keys. GPT-6.1 Sol costs $2 per million input tokens and $10 per million output (about £1.50 and £7.50, plus any VAT); Opus 5.5 costs $4 and $20 (about £3 and £15). With an API key, Codex has "No cloud-based features".
How do the usage limits compare?
Both use five-hour windows with weekly caps on top, and neither publishes a fixed message count. When you hit the limit, both let you wait, upgrade or pay for more.
OpenAI estimates, for Plus and Standard Business, 15-160 local messages per five hours with GPT-6.1 Sol, 5-45 with GPT-6 Astra, 35-285 with GPT-6.1 Terra and 350-3,000 with GPT-6 Luna. Cloud tasks use more, "weekly limits may also apply", and ChatGPT Work shares the pool. Pro plans "currently have no five-hour limit". Type /status in the CLI to check.
Anthropic describes a five-hour session limit and weekly limits, "shared across Claude and Claude Code", so heavy chat leaves less for code. Max gives 5 or 20 times Pro usage. At the limit, you can wait, turn on extra usage or move to a pay-as-you-go Console account.
Which models do they use, and which scores higher?
Each agent runs only its maker's models. On Terminal-Bench 4.0, an independent leaderboard that tests both agents as products, Claude Code scores higher, and Codex is much cheaper per run.
OpenAI recommends GPT-6 Astra for "the most demanding workflows" and GPT-6.1 Sol for "near-Astra performance at a lower cost", with a 500,000-token context window in Codex. GPT-6.1 Terra is a fast, efficient model OpenAI suggests for writing and visual work, and Free and Go users get GPT-6 Luna.
Claude Code defaults to Opus 5.5 on every paid plan, with Sonnet 5.5 and Haiku 5.5 as cheaper options and Fable 5.1 as the most capable, though Fable can bill to usage credits rather than your plan's allowance. Anthropic does not support non-Claude models; my guide to Claude Code with Ollama covers the unofficial route. The Codex CLI runs local models with --oss.
Terminal-Bench tests agents doing real terminal work. Its 4.0 leaderboard at tbench.ai is hosted by Stanford, Harbor and the Laude Institute, not by either company. These are the top Codex and Claude Code entries on 29 October 2026, all at maximum reasoning effort. The cost column is the leaderboard's total cost in US dollars for the whole 330-trial run, converted at $1 = £0.75.
| Rank | Agent and model | Resolution rate | Total cost of the run |
|---|---|---|---|
| 1 | Claude Code with Opus 5.5 | 64.8% (plus or minus 3.1) | $4,719 (about £3,540) |
| 2 | Claude Code with Sonnet 5.5 | 61.8% (plus or minus 2.9) | $7,334 (about £5,500) |
| 3 (joint) | Codex with GPT-6 Astra | 58.2% (plus or minus 2.8) | $3,267 (about £2,450) |
| 3 (joint) | Codex with GPT-6.1 Sol | 58.2% (plus or minus 3.1) | $634 (about £476) |
Read this with care: it is one benchmark, at settings your plan may not give you, with margins of about three points. And Codex with GPT-6.1 Sol finished for about a seventh of the cost of Claude Code with Opus 5.5: $634 against $4,719.
Is Codex open source? Is Claude Code?
The Codex CLI is open source under the Apache 2.0 licence. Claude Code is not open source.
In OpenAI's repository at github.com/openai/codex, version 0.165.0 was released on 27 October 2026. You can read the code, fork it and point it at other model providers through a compatible Responses API endpoint. OpenAI's desktop app, cloud service and models stay closed.
Anthropic's github.com/anthropics/claude-code repository holds the changelog, plugins and examples. Its licence file is one line: "© Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service." The latest version on npm, 2.1.312, was also released on 27 October 2026.
How do sandboxing and approvals differ?
Codex fences commands in an operating-system sandbox by default and asks before going further. Claude Code's default auto mode lets a second AI model approve actions instead of you, with an optional sandbox for shell commands.
- Codex: OpenAI says the agent "runs with network access turned off" by default, with writes limited to the workspace. In the Auto preset it edits and runs commands there, and asks before going outside it or online. The sandbox uses Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native sandbox on Windows.
- Claude Code: since version 2.1.283, terminal and VS Code sessions start in auto mode, where a classifier model reviews actions. Manual mode asks before anything but reads, and plan mode blocks edits until you approve a plan. The Bash sandbox runs on macOS, Linux and WSL2, not native Windows, and covers shell commands only.
For client code, start strict. In Codex, run codex --sandbox read-only --ask-for-approval on-request. In Claude Code, run claude --permission-mode manual and turn on the sandbox with /sandbox.
Do both support MCP, skills, plugins, hooks and subagents?
Yes. Both now support all five, so extensions no longer separate them. The differences are in the details and in where the add-ons come from. If MCP is new to you, what is MCP? explains it.
| Feature | Codex | Claude Code |
|---|---|---|
| MCP | Connect existing servers in the web app, desktop, CLI and IDE | "Hundreds of external tools and data sources" through MCP |
| Skills | Built on the open agent skills standard; shared with ChatGPT | SKILL.md files, run with /skill-name or loaded automatically |
| Plugins | One plugin directory shared by ChatGPT and Codex | Bundles of skills, agents, hooks and MCP servers from marketplaces |
| Hooks | Run scripts or MCP tools during the agent loop | Hook events with JSON input and output |
| Subagents | Parallel subagents; custom agents in local clients | Subagents with their own context, in .claude/agents/ |
| Project instructions | AGENTS.md | CLAUDE.md |
See how to install skills in Claude Code. Treat any third-party plugin as code that runs with your permissions.
Cloud tasks and GitHub: which does more?
Both run tasks in their maker's cloud and open pull requests on GitHub. The main difference is that automated pull request review comes with ChatGPT Plus, while Anthropic keeps its Code Review for Team and Enterprise.
- Codex Cloud is on Plus and above, not with an API key. You pick GitHub repositories, and each task "can keep working while your computer is asleep" before you open a pull request. Tag @codex in a pull request for a review. A GitHub Action runs Codex in CI.
- Claude Code cloud sessions are on Pro, Max and Team, and on Enterprise premium or Chat + Claude Code seats, and need GitHub to clone and push code. Code Review, for Team and Enterprise, has several agents comment inline on each pull request. Claude Code GitHub Actions let you mention @claude in a pull request or issue.
If you want to assign GitHub issues and get pull requests back without leaving GitHub, also look at the GitHub Copilot cloud agent.
Do Codex and Claude Code train on your code?
On personal plans, both can, unless you switch it off. On business plans, neither trains on your code by default.
| OpenAI Codex | Claude Code | |
|---|---|---|
| Personal plans | Free, Go, Plus and Pro: training "Opt-out available"; opt out with "do not train on my content" in OpenAI's privacy portal | Free, Pro and Max: trained on when the setting is on; Anthropic's pricing page lists it as opt-out |
| Business plans | Business, Enterprise and Edu: "No training on your business data by default" | Team, Enterprise and API: no training on code or prompts under commercial terms |
| Retention | Enterprise and Edu get data retention and data residency controls | Personal: 5 years with training on, 30 days off. Business: 30 days; zero data retention for qualified Enterprise |
Change the training setting before you open client or employer code, or use a business plan. If the code holds customers' personal data, read my guide to AI agents and UK GDPR first.
Claude Code vs Codex: which should you choose?
Pick the one that matches the subscription you already pay for. If you pay for neither, Claude Code is the stronger default for terminal-first work, and Codex is the better choice for open source, Windows, local models or a tight budget.
How to decide in four steps:
- Check what you already pay for. One agent may cost nothing extra.
- Try before you commit. ChatGPT Free includes some Codex; Claude Pro bills monthly, so you can cancel.
- Give both the same small job from your own project, with tests the agent can run, and compare results and allowance used.
- Set privacy first. Turn off training on a personal plan, or use ChatGPT Business or Claude Team, before you open client code.
Choose Codex if:
- You already pay for ChatGPT, or want to start free.
- You want an open-source CLI you can read, audit and fork.
- You work on Windows without WSL2 and want a sandbox.
- Code must stay on your machine, so you need local models.
- Cost per run matters more than benchmark points.
Choose Claude Code if:
- You already pay for Claude, or want the main plan at £18 rather than £20.
- You want the agent with the highest Terminal-Bench 4.0 score on 29 October 2026.
- You want long tasks with fewer prompts, in auto mode.
- You want Anthropic's models, including Fable 5.1 for the longest jobs.

My verdict: both are capable and well documented. Claude Code has the edge on the benchmark and the main UK price; Codex on openness, free access, Windows and running costs. If you would rather work in an AI editor than hand jobs to an agent, see Claude Code vs Cursor and my Cursor review.
Frequently asked questions
Is Codex better than Claude Code?
Neither is better for everyone. As of 29 October 2026, Claude Code with Opus 5.5 leads the independent Terminal-Bench 4.0 leaderboard at 64.8%, against 58.2% for Codex with GPT-6.1 Sol, but the Codex run cost about a seventh as much. Start with the subscription you already pay for.
Is Codex free?
Partly. ChatGPT Free includes limited Codex use in the desktop app with GPT-6 Luna, and the Codex CLI is free, open-source software under the Apache 2.0 licence. Full use starts with ChatGPT Plus at £20 a month in the UK. Claude Code has no free plan.
Which is cheaper in the UK, Codex or Claude Code?
For the main personal plan, Claude Code is cheaper: Claude Pro costs £18 a month including VAT, or £15 a month billed yearly, against £20 for ChatGPT Plus. Codex is cheaper to start, because ChatGPT Free and Go at £7 include some Codex use. For teams, ChatGPT Business costs £18 a seat monthly against £22.50 for Claude Team Standard.
Can I use Codex and Claude Code together?
Yes. They are separate tools, so you can run both in the same Git repository, and both install as extensions in VS Code. OpenAI publishes a guide to importing from another agent. Each has its own usage limits and privacy settings, and paying for both main plans costs £38 a month.
Is Claude Code open source?
No. The Claude Code repository on GitHub holds the changelog, plugins and examples, but its licence file reads: "All rights reserved. Use is subject to Anthropic's Commercial Terms of Service." The Codex CLI, by contrast, is open source under the Apache 2.0 licence, although OpenAI's desktop app, cloud service and models are closed.
Do Codex and Claude Code train on my code?
On personal plans, they can unless you opt out. OpenAI lists training on Free, Go, Plus and Pro as "Opt-out available", and Anthropic trains on Free, Pro and Max when the model improvement setting is on. On ChatGPT Business and Enterprise, and on Claude Team, Enterprise and the API, neither company trains on your code by default.
Read next
- Claude Code explained: UK pricing, install and how it compares
- OpenAI Codex explained: UK pricing and install on Mac and Windows
- AI coding agents compared: Claude Code vs Codex vs Copilot vs Cursor and more
- How to install and use skills in Claude Code
- GitHub Copilot coding agent: UK prices and how to assign issues
- Cursor review: AI coding agents on your desktop and in the cloud
Sources
- ChatGPT pricing, OpenAI (UK view) - Go £7, Plus £20, Pro from £89, Business £18 or £15 a seat, Codex by plan, training opt-out; no VAT statement - checked 29 October 2026
- Multi-currency billing, OpenAI Help - GBP billing for the United Kingdom; no statement on whether VAT is included - checked 29 October 2026
- Codex pricing and usage limits, OpenAI - plans, five-hour estimates, Pro limits, credits, API-key limits - checked 29 October 2026
- Codex models, OpenAI - GPT-6.1 Sol, Terra, Astra, Luna, 500,000-token context, GPT-5.5 retirement - checked 29 October 2026
- Codex CLI, OpenAI - install and features - checked 29 October 2026
- Agent approvals and security, OpenAI - network off by default, Auto preset, MCP approvals - checked 29 October 2026
- Sandboxing, OpenAI - Seatbelt, bubblewrap, Windows sandbox, full access - checked 29 October 2026
- Codex Cloud, OpenAI - cloud tasks, GitHub repositories, pull requests - checked 29 October 2026
- Codex GitHub Action, OpenAI - CI and pull request reviews - checked 29 October 2026
- Model Context Protocol, OpenAI - MCP in ChatGPT and Codex - checked 29 October 2026
- Build skills, OpenAI - agent skills standard and plugin directory - checked 29 October 2026
- Hooks, OpenAI - hooks in the Codex loop - checked 29 October 2026
- Subagents, OpenAI - parallel and custom agents - checked 29 October 2026
- ChatGPT desktop app for Linux, OpenAI - supported distributions - checked 29 October 2026
- Advanced configuration, OpenAI - --oss local providers, custom providers - checked 29 October 2026
- API pricing, OpenAI - GPT-6.1 Sol $2 and $10 per million tokens - checked 29 October 2026
- How your data is used to improve model performance, OpenAI Help - privacy portal opt-out, business exclusions - checked 29 October 2026
- openai/codex repository, GitHub - Apache-2.0 licence, platforms, release 0.165.0 - checked 29 October 2026
- @openai/codex on npm - 0.165.0 released 27 October 2026 - checked 29 October 2026
- Claude plans and pricing, Anthropic (UK view) - Pro £18 or £180 a year, Max from £90, Team £22.50 or £18, Premium £113 or £90, prices include 20% VAT, training opt-out - checked 29 October 2026
- Claude Code overview, Anthropic - surfaces and install - checked 29 October 2026
- Claude Code setup, Anthropic - system requirements - checked 29 October 2026
- Claude Code model configuration, Anthropic - Opus 5.5 default, Fable, aliases - checked 29 October 2026
- Claude Code permission modes, Anthropic - auto mode default since v2.1.283, modes table - checked 29 October 2026
- Claude Code sandboxing, Anthropic - macOS, Linux and WSL2 only; shell commands only - checked 29 October 2026
- Claude Code MCP, Anthropic - MCP support - checked 29 October 2026
- Claude Code skills, Anthropic - SKILL.md - checked 29 October 2026
- Claude Code plugins, Anthropic - plugins and marketplaces - checked 29 October 2026
- Claude Code hooks reference, Anthropic - hook events - checked 29 October 2026
- Claude Code subagents, Anthropic - custom subagents - checked 29 October 2026
- Claude Code in the cloud, Anthropic - plans with cloud sessions, GitHub requirement - checked 29 October 2026
- Claude Code Code Review, Anthropic - Team and Enterprise, inline comments - checked 29 October 2026
- Claude Code GitHub Actions, Anthropic - @claude mentions, /install-github-app - checked 29 October 2026
- Claude Code data usage, Anthropic - training policy, 5-year and 30-day retention, local transcripts - checked 29 October 2026
- Claude Code LLM gateways, Anthropic - no support for non-Claude models - checked 29 October 2026
- Using Claude Code with your Pro or Max plan, Anthropic Help - limits shared with Claude, extra usage - checked 29 October 2026
- Usage limit best practices, Anthropic Help - five-hour session and weekly limits - checked 29 October 2026
- Claude API pricing, Anthropic - Opus 5.5 $4 and $20, Sonnet 5.5 $2 and $10 per million tokens - checked 29 October 2026
- Claude Code licence, GitHub - "All rights reserved" - checked 29 October 2026
- @anthropic-ai/claude-code on npm - 2.1.312 released 27 October 2026 - checked 29 October 2026
- Terminal-Bench 4.0 leaderboard, tbench.ai (Stanford, Harbor, Laude Institute) - resolution rates with 95% confidence intervals and total run costs in US dollars ($4,718.65, $7,333.64, $3,267.18, $634.24) - checked 29 October 2026



