Claude Code vs Codex: an honest comparison for teams (2026)
Claude Code vs OpenAI Codex compared on what matters to a team: surfaces and workflow, models, pricing, sandboxing and approvals, MCP, skills and AGENTS.md vs CLAUDE.md, and enterprise data residency. Plus why many teams end up running both.
Claude Code and OpenAI Codex have converged. Both started as terminal agents, both now run in the IDE, in a desktop app and in the cloud, and both read project instructions, call MCP servers and load skills. So "which one is better" is the wrong question for most teams. The useful questions are which models you want, how much autonomy each tool grants by default, and how either one fits your cloud, your budget and your compliance rules.
This guide compares the two as of October 2026, based on the vendors' own documentation. If you are new to Anthropic's tool, start with the Claude Code overview.
At a glance
| Claude Code | Codex | |
|---|---|---|
| Vendor | Anthropic | OpenAI |
| Surfaces | Terminal, VS Code, JetBrains, desktop app, web, Slack, GitHub Actions | CLI, IDE extension, desktop app, web/cloud, GitHub |
| Models | Opus, Sonnet, Haiku (Opus 5.5 is the default on paid plans) | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna |
| Project instructions | CLAUDE.md (reads AGENTS.md too) | AGENTS.md |
| Skills folder | .claude/skills | .agents/skills |
| Local sandbox | Opt-in, /sandbox | On by default (workspace-write) |
| Cheapest paid plan | Pro, 20 USD/month | Plus, 20 USD/month (also on Free and Go) |
Workflow and surfaces
Day to day, the two feel alike. You start the agent in a repository, describe a task, and it searches the code, plans, edits files and runs tests.
# Claude Code
curl -fsSL https://claude.ai/install.sh | bash
claude
# Codex
curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex
Both have a non-interactive mode for scripts and CI: claude -p "..." and codex exec "...". Both run long tasks in the cloud while your laptop is closed, Claude Code on the web and in the Claude mobile app, Codex in its web and cloud surface. Claude Code adds scheduled routines, a Slack integration that turns a bug report into a pull request, and subagents that split a task in parallel. Codex is tightly tied to the ChatGPT account and apps, which matters if your organisation already lives in ChatGPT.
Installation details for Claude Code, including Windows, are in How to install Claude Code.
Models
This is the real difference, and the reason the comparison never settles.
Claude Code runs Anthropic's models. The opus alias currently maps to Opus 5.5 on Anthropic's API, sonnet to Sonnet 5.5, and haiku covers quick, cheap work. Switch with /model in a session or claude --model sonnet at startup. Note that the mapping differs by provider: on Amazon Bedrock and Microsoft Foundry the same aliases point to older versions, so check what your cloud actually serves.
Codex runs OpenAI's models. OpenAI's docs recommend GPT-6 Astra as the most capable, GPT-6.1 Sol as near-Astra at lower cost, and GPT-6 Luna for focused, efficient tasks. GPT-5.5 retires on 14 October 2026. Switch with /model or codex -m gpt-6.1-sol, or set model in ~/.codex/config.toml.
In practice developers develop strong preferences per task type: one model plans a refactor better, the other writes the tests faster, and the ranking shifts with every release. We are not going to publish a winner here, because any benchmark in a guide like this is out of date within a quarter. Run both on a week of your own tickets and look at the diffs.
Pricing and plans
Neither tool is sold on its own. Both come with a chat subscription or with per-token API billing.
| Plan | Claude Code | Codex |
|---|---|---|
| Free | Not included | Included (ChatGPT Free) |
| Entry | Pro, 20 USD/month (17 billed annually) | Go, 8 USD/month; Plus, 20 USD/month |
| Heavy individual | Max, from 100 USD/month | Pro, from 100 USD/month |
| Team | Team standard seat 20 USD (annual) or 25 USD (monthly); premium seat 100/125 USD | Business, 20 USD/user (annual) or 25 USD (monthly) |
| Enterprise | 20 USD/seat/month plus usage at API rates | Custom pricing |
| API key | Per token | Per token |
Usage limits are where the real cost hides. Both vendors meter subscription usage in rolling windows, and both say consumption depends heavily on model and task size. A developer who runs the agent for hours a day will outgrow the 20 dollar tier on either side. For Claude Code numbers and cost controls, see Claude Code pricing.
Sandboxing and approvals
Here the defaults differ, and it is worth understanding before you roll either out.
Codex sandboxes by default. It has three sandbox modes: read-only, workspace-write (the default for local work: edit the workspace, run local commands inside it) and danger-full-access. In workspace-write, outbound network access is off unless you opt in. Approval policies decide when the agent stops to ask: on-request asks when it needs to go beyond the sandbox, never does not stop. Enforcement is native: Seatbelt on macOS, bubblewrap on Linux and WSL2.
codex --sandbox workspace-write --ask-for-approval on-request
Claude Code asks by default and sandboxes on request. Its default mode prompts before edits and shell commands. Other modes are acceptEdits, plan (read-only exploration), auto (a classifier reviews actions instead of you), dontAsk and bypassPermissions. The OS-level sandbox for shell commands uses the same Seatbelt and bubblewrap mechanisms but is off by default: run /sandbox or set sandbox.enabled in settings. It covers shell commands only; file tools, MCP servers and hooks run outside it.
For a team, Claude Code's strength is central policy. Administrators deploy managed settings that users cannot override, including deny rules and disableBypassPermissionsMode:
{
"permissions": {
"deny": ["Read(./.env)", "Bash(curl:*)"],
"disableBypassPermissionsMode": "disable"
},
"sandbox": { "enabled": true }
}
Our view: Codex has the safer out-of-the-box default for an individual developer; Claude Code gives an organisation finer, enforceable rules. Either way, set the policy centrally rather than trusting each laptop.
MCP, skills and instruction files
The ecosystems have largely standardised, which is good news if you run both.
MCP. Both are MCP clients for stdio and streamable HTTP servers, with OAuth for remote ones. The same server, added to each:
claude mcp add context7 -- npx -y @upstash/context7-mcp
codex mcp add context7 -- npx -y @upstash/context7-mcp
Claude Code stores project servers in .mcp.json; Codex uses [mcp_servers.<name>] blocks in ~/.codex/config.toml or a project .codex/config.toml, and codex mcp login <name> for OAuth. More in Add an MCP server to Claude Code.
Skills. Both follow the open Agent Skills standard: a folder with a SKILL.md holding a name, a description and instructions. Claude Code reads .claude/skills and ~/.claude/skills; Codex reads .agents/skills and ~/.agents/skills. Claude Code adds its own frontmatter fields (such as context: fork or disable-model-invocation) that Codex will ignore, so keep shared skills to the standard fields. See Claude skills vs MCP for when each fits.
AGENTS.md vs CLAUDE.md. Codex reads AGENTS.md from ~/.codex, then from the git root down to the current directory, capped at 32 KiB by default. Claude Code reads CLAUDE.md, and since recent versions also reads AGENTS.md when there is no CLAUDE.md. The simplest setup for a mixed team is one AGENTS.md as the source of truth, plus a one-line CLAUDE.md that imports it:
echo "@AGENTS.md" > CLAUDE.md
Enterprise, data and residency
At the enterprise tier OpenAI lists SCIM, role-based access, audit logs through its Compliance API and no training on business data by default. On the Anthropic side, Team and Enterprise come with central admin and the managed settings shown above. The bigger difference for European companies is where inference runs.
Claude Code can be pointed at Amazon Bedrock, Google Cloud or Microsoft Foundry instead of Anthropic's API, so prompts and code are processed in the cloud region you pick. Model availability varies by provider and region.
Codex can use a custom model provider. OpenAI's docs show an Azure OpenAI example in config.toml, which sends requests to your own Azure resource:
# ~/.codex/config.toml
model_provider = "azure"
[model_providers.azure]
name = "Azure"
base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2025-04-01-preview" }
wire_api = "responses"
Check which deployment type each model has in your region: the newest OpenAI models do not always launch in EU data zones.
The multi-model argument
Most teams we talk to do not pick one. Some developers prefer Claude for long refactors, others prefer GPT for quick fixes, and the preference flips with each model release. Standardising on one vendor saves an invoice but locks you out of whichever model is ahead next quarter.
Running both is easy on the developer side, since the MCP servers, skills and AGENTS.md carry over. The hard part is governance: two sets of keys, two policy models, two audit trails, two places code leaves the building. That is the job of a gateway. Walma AI Hub runs in your own Azure tenant in an EU region and serves Claude, GPT and other models to Claude Code, Codex and Cursor through one endpoint, with per-team budgets, model policy, approved MCP servers and one log. Our MCP gateway guide explains the pattern in more depth.
Which should you choose?
- Choose Claude Code if you want fine-grained, centrally enforced permissions, routines and Slack-driven workflows, or if your developers prefer Claude models.
- Choose Codex if your company already standardised on ChatGPT, you want a sandbox that is on from the first run, or your developers prefer GPT models.
- Choose both if you have more than a handful of developers. Share one
AGENTS.md, keep skills to the open standard, and put policy and logging in a gateway rather than on each machine.
Frequently asked questions
What is the difference between Claude Code and Codex?+
Both are agentic coding tools that read a repository, edit files and run commands. Claude Code is Anthropic's agent and runs Claude models (Opus, Sonnet, Haiku). Codex is OpenAI's agent and runs GPT models (GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna). The workflows are now very similar; the bigger differences are the models, the default safety posture and how each plugs into your cloud.
Is Codex cheaper than Claude Code?+
The entry points are the same: both are included in a 20 US dollar per month individual plan, and both offer business seats from 20 dollars per user per month billed annually. Codex is also available on ChatGPT Free and Go. What you actually pay depends on usage limits, model choice and whether you bill per token through the API.
Can Claude Code read AGENTS.md?+
Yes. Recent versions of Claude Code read AGENTS.md when the repository has no CLAUDE.md, and a setting lets it read both. You can also import AGENTS.md from a CLAUDE.md, so one instruction file can serve both agents.
Do Claude Code and Codex both support MCP and skills?+
Yes. Both connect to MCP servers over stdio and HTTP, and both support skills in the open Agent Skills format (a folder with a SKILL.md file). Claude Code looks in .claude/skills, Codex in .agents/skills.
Can we run Claude Code and Codex with EU data residency?+
Claude Code can run against Amazon Bedrock, Google Cloud or Microsoft Foundry instead of Anthropic's API, and Codex can point at an Azure OpenAI resource through a custom model provider. In both cases inference follows the cloud region you choose, subject to which models are deployed there. A gateway in your own EU tenant can serve both.
The same tools, in your EU region, under your control
A 20-minute walkthrough with an engineer. We map it to your tools, your MCP servers and your budget model.