AI Tools
Codex vs Claude Code in 2026: Which One to Choose? The Full Comparison
In short: Codex (OpenAI) is the best value: it's included from ChatGPT's free plan and shines on tasks run in parallel in the cloud. Claude Code (Anthropic) goes further on long, complex tasks, with more control and customization, but it requires a paid plan from $20 a month. Both read the same instructions file (AGENTS.md) and speak the same tool standard (MCP): many developers use both.
| Criterion | Codex | Claude Code |
|---|---|---|
| Vendor | OpenAI | Anthropic |
| Main model | GPT-6.1 Sol | Claude Opus 5.5 |
| Free plan | Yes, with low limits | No |
| Entry price | $8 (Go) or $20 (Plus) a month | $20 a month (Pro) |
| Strength | Price, parallel cloud tasks, PR review | Long tasks, fine control, customization |
| Source code | Open source CLI (Apache-2.0) | Closed |
| Instructions file | AGENTS.md | CLAUDE.md, or AGENTS.md as a fallback |
Codex and Claude Code: What These Two Coding Agents Are
Both are coding agents: you describe a task in plain language, they read your project, edit files, run commands and tests, then show you the result. It's no longer autocomplete, it's a virtual developer you steer.
- Codex is OpenAI's coding agent. Since July 9, 2026, it lives in the ChatGPT desktop app (Windows and Mac, Linux in preview since August), next to the Chat and Work modes. It also comes as a command-line tool (CLI), an editor extension, cloud tasks launched from the web, mobile or Slack, and code review on GitHub.
- Claude Code is Anthropic's coding agent. It runs in the terminal (macOS, Linux, WSL and native Windows), in VS Code, Cursor and JetBrains, in a desktop app, on the web (claude.ai/code) and on mobile. It also plugs into Slack, GitHub Actions and GitLab CI/CD.
Their origins still show: Codex was built around cloud tasks (you launch several tasks in parallel and get pull requests back), Claude Code around local work, in your terminal, with you in the loop. Today, each does both.
The Models Behind Each Tool
- Codex relies on GPT-6.1 Sol, the model OpenAI has recommended in Codex since late September 2026 and describes as close to its flagship GPT-6 Astra at a much lower cost. GPT-6 Luna is the fast, cheap model. GPT-5.5 left Codex on October 14, 2026 for accounts signed in with ChatGPT. Since October 8, an Ultrafast mode for GPT-6.1 Sol is reserved for the $500 Pro plan.
- Claude Code uses Claude Opus 5.5 (released September 22, 2026, with a fast mode up to 2.5x quicker) and Claude Sonnet 5.5 for lighter tasks. Since October 7, Claude Haiku 5.5 is the default Haiku model, useful for subagents (secondary agents that handle part of a task). Depending on the plan, Claude Code also gives access to Claude Fable 5.1, Anthropic's most advanced model.
Watch out for the comparisons going around: many still cite Opus 4.8 or GPT-5.5, two outdated models.
Pricing and Usage Limits
Codex is included in every ChatGPT plan:
| ChatGPT plan | Price | Codex |
|---|---|---|
| Free | $0 | Included, low limits, GPT-6 Luna |
| Go | $8 a month | Included, GPT-6 Luna |
| Plus | $20 a month | GPT-6.1 Sol and GPT-6 Luna |
| Pro | $100, $200 or $500 a month | No 5-hour limit (weekly limits may apply) |
| Business | $20 per user per month billed annually (2 minimum), $25 billed monthly | Included |
On the Plus plan, OpenAI estimates the limits, every 5 hours, at 15 to 160 messages with GPT-6.1 Sol, 5 to 45 with GPT-6 Astra and 350 to 3,000 with GPT-6 Luna. Cloud tasks use up that allowance faster.
Claude Code isn't available on Claude's free plan:
| Claude plan | Price |
|---|---|
| Pro | $20 a month ($17 billed annually) |
| Max 5x | $100 a month |
| Max 20x | $200 a month |
| Team, Standard seat | $25 a month ($20 billed annually) |
| Team, Premium seat | $125 a month ($100 billed annually) |
Limits work on a rolling 5-hour window, plus a weekly limit, shared between claude.ai and Claude Code. Anthropic doesn't publish absolute figures. Bonus since October 7, 2026: Max and Team include monthly API credits ($100 for Max 5x, $200 for Max 20x), usable for your own applications but not for Claude Code. All the details in our article on Claude Max and Team API credits.
On the API (pay as you go, price per million tokens):
| Model | Input | Output |
|---|---|---|
| Claude Opus 5.5 | $4 | $20 |
| Claude Sonnet 5.5 | $2 | $10 |
| Claude Fable 5.1 | $10 | $50 |
| GPT-6.1 Sol (reported) | about $2 | about $10 |
Pricing verdict: to get started or for moderate use, Codex clearly wins. For heavy daily use, Claude's Max plans stay predictable, but cost more.
Security and Autonomy
A coding agent runs commands on your machine: what it's allowed to do is a key question.
- Codex works in an operating-system-level sandbox (an isolated environment). By default, it can edit project files but asks before going further, and network access is off. Three presets: auto, read-only, full access.
- Claude Code offers several permission modes: manual, auto-accept edits, plan mode (it proposes a plan you approve before any change) and auto mode, where a second model checks each risky action before letting it through. Since September 25, 2026, auto mode is the starting mode.
Either way, keep Git clean and review what goes to production. An agent saves an enormous amount of time, it doesn't replace review.
AGENTS.md and CLAUDE.md: The Instructions Files
Both tools read a file that describes your project: commands, conventions, pitfalls to avoid. That's what separates an agent that guesses from an agent that knows your code.
- Codex reads AGENTS.md (global, at the repository root and in subfolders).
- Claude Code reads CLAUDE.md and also keeps an automatic memory. It reads AGENTS.md when there's no CLAUDE.md, and a setting lets it load both.
Many articles still claim otherwise. In practice, a single well-written AGENTS.md now works for both tools. And Codex can import a Claude Code configuration.
Extensions, MCP and Integrations
Both tools support MCP (Model Context Protocol, the standard that lets an AI use your tools: database, CRM, browser…), hooks (scripts triggered automatically at certain steps), subagents and skills (reusable know-how).
| Topic | Codex | Claude Code |
|---|---|---|
| Source code | Open source CLI (Apache-2.0, written in Rust) | Closed |
| Customization | Configuration, MCP, hooks, skills | Plugins, skills, hooks, subagents, MCP servers |
| Pull request review | "@codex review" as a GitHub comment | GitHub Actions and code review |
| Programmatic use | Codex CLI in non-interactive mode | Agent SDK and headless mode (claude -p) |
To connect these agents to your automations, see our n8n and MCP guide too.
Performance: What Do the Benchmarks Say?
Take the figures with caution: each vendor publishes its own tests, under its own conditions.
| Benchmark | Claude Opus 5.5 | GPT-6 Astra | Source |
|---|---|---|---|
| Terminal-Bench 4.0 (command-line tasks) | 66.4% | 57.9% | Anthropic, September 22, 2026 (GPT-6 Astra score as reported by OpenAI) |
| FrontierCode v1.1 | 54.4% | 53.3% | Anthropic, September 22, 2026 |
| GDPval-AA v2.1 (office work, Elo score) | 1846 | 1542 | Anthropic, September 22, 2026 |
An independent test by Artificial Analysis, reported by CatDoes, gives 52.5% for Opus 5.5 versus 39.8% for GPT-6 Sol on Terminal-Bench, but with a cost per task of $1.34 versus $0.25.
In other words: Claude often goes further, Codex does more per dollar.
Which One to Choose for Your Use Case
| Your situation | Best fit | Why |
|---|---|---|
| You're starting out or on a tight budget | Codex | Included from ChatGPT's free plan |
| You want to run several tasks in parallel and get PRs back | Codex | Built around cloud tasks |
| You work mostly on GitHub and want automatic PR review | Codex | "@codex review" right in a comment |
| Large codebase, refactors, long tasks | Claude Code | Goes further without intervention |
| You want fine control (plan, permissions, hooks) | Claude Code | Deeper permission modes and customization |
| You build your own agents | Claude Code | Agent SDK, plus API credits included in Max and Team |
| A team that wants the best of both | Both | A shared AGENTS.md makes switching almost seamless |
Up to date as of October 18, 2026. Sources: official Codex documentation and changelog (learn.chatgpt.com), Claude Code documentation and changelog (code.claude.com), Claude pricing (claude.com/pricing) and platform pricing (platform.claude.com), the Claude Opus 5.5 announcement (anthropic.com, September 22, 2026), CatDoes and Artificial Analysis.
Want a SaaS or an AI agent built with these tools, but delivered clean, secure and maintainable? Book a 30-minute call to talk it through.
Frequently asked questions
Is Codex free?
Yes, Codex is included in ChatGPT's free plan, with low usage limits and the GPT-6 Luna model. For regular use with GPT-6.1 Sol, you need at least the Plus plan at $20 a month.
Is Claude Code free?
No. Claude Code requires at least the Claude Pro plan ($20 a month, $17 billed annually) or pay-as-you-go API usage.
What's the difference between Codex and Claude Code?
Codex (OpenAI) is cheaper and built around parallel cloud tasks and pull request review. Claude Code (Anthropic) goes further on long tasks and offers finer control: plan mode, permissions, hooks, plugins.
What's the best coding agent in 2026?
It depends on the use case. On the benchmarks published by Anthropic, Claude Opus 5.5 beats GPT-6 Astra on Terminal-Bench 4.0 (66.4% versus 57.9%), but Codex costs much less per task. On a tight budget, Codex; for large projects, Claude Code.
Can you use Codex and Claude Code on the same project?
Yes. Both read AGENTS.md, support MCP and work with Git. Many developers use one to design and the other to review.
Which one should a beginner choose?
Codex, for its entry price and ChatGPT integration. Claude Code becomes worthwhile as your projects grow.
Codex CLI or Claude Code CLI: what's the difference?
Codex CLI is open source (Apache-2.0 license, written in Rust) and works with a ChatGPT account or an API key. Claude Code is closed, but highly customizable (plugins, skills, hooks, subagents) and scriptable with the Agent SDK.
Do you need to know how to code to use a coding agent?
For a prototype, not necessarily. For a product in production (security, payments, customer data), yes: you need to understand and review what the agent writes.