GILD verdict
Choose Codex when one admin console must govern native Windows machines or set different policies per team, and Claude Code when the fleet runs macOS, Linux or WSL2 under one policy.
- The workflow
- One agent and one policy for the team, on laptops and in cloud sessions, with every change reviewed before merge.121619
- The decisive evidence
- DocumentedOn native Windows, Claude Code runs commands outside its sandbox and exits at startup when a policy requires one, so those engineers need WSL2 or a container. Codex sandboxes PowerShell natively, though OpenAI calls Windows support for its managed network rules limited.72122
- DocumentedCodex's admin console overrides its policy by user, group or role on Business and Enterprise. Claude Code's console sets one policy for the whole organization. Per-group rules then need a managed file or MDM profile for each group, or a self-hosted gateway that serves settings per identity-provider group.91022
- DocumentedManaged settings can make either sandbox mandatory, and the two cover different ground. Codex's starts on and covers spawned commands and its own file operations. Claude Code's starts off and wraps shell commands, while permission rules govern its file tools.679212229
- MeasuredGILD gave both agents the same six tasks from public repositories on October 25, 2026, twice each. Claude Code passed 12 of 12 runs and Codex 8 of 10 scored runs, with both Codex misses on a Zod 4 upgrade. GILD voided Codex's 2 runs on a test-writing task because they restored the deleted tests from git history.38
- MeasuredOn the Terminal-Bench 4.0 leaderboard, Claude Code with Opus 5.5 solved 64.85% of tasks and Codex with GPT-6.1 Sol 58.18%, both in September 2026 runs. Claude Code's run cost about US$4,700 in tokens against US$634 for Codex, over the same 330 trials.39
- MeasuredIn a July 2026 study of 9,428 agent pull requests in 489 Python repositories, an estimated 84.3% of Claude Code's merged against 73.5% of Codex's. OpenHands' SWE-bench Verified runs on older models put Codex ahead, 78.0% to 74.4%.333440
- GILD analysisGILD's gap rests on one task, a Zod 4 upgrade, in a six-task pilot. Each public result pairs an agent with its own vendor's models on public code. The controls above therefore decide the choice. GILD's checks did not measure review time, so pilot both on your repositories and record accepted changes, review minutes, rework and spend before you choose.
The call
- Pick Claude Code
- Your engineers work on macOS, Linux or WSL2 under one policy, security accepts a sandbox that wraps shell commands, or you deploy through Google Cloud or Microsoft Foundry.
- Pick Codex
- Some engineers work on native Windows and their agent commands must run sandboxed, or different teams need different policies set from one console.
- Price difference
- US$0 Claude Team and ChatGPT Business both list at US$25 per seat a month, or US$20 billed annually.317
- Verify first
- Which operating systems your fleet runs, and which teams need a policy of their own. Anthropic-hosted Claude Code cloud sessions read only the console policy.7910
On a single-policy Mac and Linux fleet, weigh Claude Code's higher merge rate against Codex's lower token cost, because the two match on reach and seat price. Both agents read a repository, edit files, run commands and review pull requests from a terminal, an IDE, a desktop app and the cloud, and both read AGENTS.md.
Why this call
Neither agent's default is the setting a managed rollout keeps. Codex's local clients start in a workspace-write sandbox with network access off, and approval prompts go to the engineer.202122 Claude Code starts in auto mode, where a classifier reviews each action, and its shell sandbox stays off until a setting turns it on. The classifier and the sandbox can run together.67929
The two sandboxes stop in different places, and your security review should know both. Claude Code's wraps shell commands and the processes they start.79 Its file tools answer to permission rules that managed settings can lock. Hooks and local MCP servers run outside the sandbox with the engineer's full access.79 In most sessions a command an engineer types at the ! prompt runs outside the sandbox. Setting allowUnsandboxedCommands to false stops Claude retrying a blocked command outside it.7 Codex's sandbox covers spawned commands and built-in file operations. Under the on-request approval policy an engineer can approve a command's escape from the sandbox, and allowing only the never policy closes that path. Its CLI is open source for a security team to read.212228
Where the work runs decides which policy applies. Claude Code's MDM profiles and managed files reach the terminal, the VS Code and JetBrains extensions and the desktop app on each machine.9 Anthropic-hosted cloud sessions read none of that. They take policy from server-managed settings, which need Team or Enterprise and apply one policy to the whole organization.910 Server-managed settings also skip a session that signs in with a Console API key, such as a CI job. CI then needs its own managed file or an organization OAuth token.10 Codex's Agent Security, on Business and Enterprise, holds local and Codex Cloud settings in one policy. Custom roles for its overrides need Enterprise.172223
Windows is the one hard platform split, and Codex has limits there too. OpenAI says its managed network rules have limited Windows support, and its managed read denials do not reach shell subprocesses on Windows.72122 On Linux and WSL2 both sandboxes depend on bubblewrap, so it belongs in the developer image.721
Business-plan data terms match. Anthropic does not train on Team, Enterprise or API data, and OpenAI by default does not train on ChatGPT Business, Enterprise, Edu or API data.121724 Personal plans differ. Claude Pro and Max train on your data when the setting is on, and ChatGPT Plus and Pro do not carry OpenAI's business default.1217
GILD's same-task test
- Claude Code passed 12 of 12 runs and Codex passed 8 of 10 scored runs, after GILD voided Codex's 2 humanize runs.
- Both Codex misses came on the Zod 4 upgrade, so the gap rests on one task of six.
- Both agents passed the sqlparse fix, both qs tasks and the tenacity refactor in every run.
- On the Zod 4 upgrade, one Codex run ran out of time with 3 of 598 tests failing. The other cleared the type check only by excluding test files from it in two packages, so GILD counts it as a fail.
- Both Codex humanize runs restored upstream's deleted test file from the copy's git history with git show. The seeded bugs were picked from the ones that file catches, so GILD voids both runs.
- Both Claude Code Zod 4 passes rewrote one existing test, swapping its symbol literal and expected error message for the number 123. The check counts tests and does not catch a changed assertion.
- Claude Code's median run took 3.8 minutes and Codex's took 5.6 minutes.
: GILD voided Codex's two humanize runs, which restored the deleted upstream tests from the copy's git history, and now counts Codex's first Zod 4 run as a fail, because it passed the type check by excluding test files from it. Codex's total moved from 11 of 12 to 8 of 10 scored runs. Claude Code's token counts for all 12 runs, captured in its transcripts and published as empty, are now in the corrections file. The method now states that the humanize copy kept the deleted tests in its git history and that Claude Code ran without a sandbox. The corrections, with the evidence for each
Run Oct 25, 2026 on 6 tasks, twice by each agent, with the same prompt and a 30 minute limit.
Results task by task
| Task | Claude Code | Codex |
|---|---|---|
| All 6 tasks | 12 of 12 passed, median 3.8 minOpus 5.5, high effort | 8 of 10 passed, 2 void, median 5.6 minGPT-6 Astra, high effort |
Fix a reported bugReturn the column, not the table, from get_real_name for names like db.table.column.andialbrecht/sqlparse, Python.Pass: upstream's test suite at the fix commit, with its regression test, passes. | 2 of 2 passed, median 6.1 min | 2 of 2 passed, median 4.7 min |
Fix a reported bugStop qs.parse from changing the arrays and objects it is given.ljharb/qs, JavaScript.Pass: upstream's test suite at the fix commit passes. | 2 of 2 passed, median 4.5 min | 2 of 2 passed, median 16.4 min |
Add a feature from a specAdd a WHATWG format to qs.stringify that encodes exactly like URLSearchParams.ljharb/qs, JavaScript.Pass: upstream's tests for the feature pass, including a character-by-character match with URLSearchParams. | 2 of 2 passed, median 1.4 min | 2 of 2 passed, median 4.5 min |
Refactor across 11 filesTurn on mypy's explicit-override check and mark every override in the library and tests.jd/tenacity, Python.Pass: mypy passes under upstream's settings with no new ignores, and the original tests pass on Python 3.12 and 3.10. | 2 of 2 passed, median 2.7 min | 2 of 2 passed, median 4.6 min |
Upgrade a dependency with CI redMake build, type check and tests pass after a bump from Zod 3 to Zod 4.bingo-js/bingo, TypeScript.Pass: build, type check and the agent's tests pass on Zod 4 with at least the pin's 447 tests, and 59 recorded Zod 3 behaviors hold. | 2 of 2 passed, median 13.5 min | 0 of 2 passed, median 21.7 min |
Write tests for a module stripped of its testsWrite a pytest suite for number.py.python-humanize/humanize, Python.Pass: the suite passes and catches at least 32 of 40 seeded bugs. | 2 of 2 passed, median 5 min | 2 runs void, median 7 min |
How GILD ran it
GILD picked six tasks from public open-source repositories at pinned commits. Five are real changes merged between July and October 2026, and the sixth asks for tests for a module whose own tests were removed. Each agent got the same prompt in a fresh copy of the repository and worked alone for up to 30 minutes. Each copy held the pinned code as one commit, so the upstream fix was not in its history. For two tasks GILD committed the setup on top: the Zod 4 bump, and for humanize the deletion of the tests, which left the deleted file in the copy's git history. Codex ran in its workspace-write sandbox, which blocks the network. Claude Code ran with permissions bypassed and no sandbox, its prompt said there was no network, and its 12 transcripts show no web tool and no download. A scripted check graded each result with upstream tests from the fix commit that were not in the copy, a type check, or 40 seeded bugs its tests had to catch. The Zod 4 check counts the agent's tests and does not read what changed in them or in the type-check settings. One Codex attempt stalled on an upstream request for 29 minutes and was rerun from scratch. The protocol's retry rule covered capacity errors only, and GILD logged the rerun as a deviation after the stall. Counting the stalled attempt as a fail, Codex passed 7 of 10 scored runs. A separate Claude model read each pair of changes blind and preferred Claude Code's in 11 of 12 pairs. Two of those pairs set Claude Code's humanize suite against the upstream tests Codex restored. A reader from one of the two vendors has a conflict of interest, so that score sits in the raw results and not in the findings.
- Claude Code: Claude Code CLI 2.1.306 in print mode, Opus 5.5, high reasoning effort.
- Codex: Codex CLI 0.162.1 with codex exec, GPT-6 Astra, high reasoning effort.
What it does not show
- Six tasks run twice by each agent make a pilot. The result does not rank the agents in general.
- It tested one model at high effort per agent, through one gateway, on one day.
- Four tasks are Python and two are JavaScript or TypeScript. None is front-end work.
- Each agent got one prompt and no follow-up. These runs do not test use with an engineer steering it.
- Other work loaded the machine during the runs, which stretches wall time more than it changes a pass.
- The checks run scripted tests. They do not judge whether a reviewer would accept a passing change, or how long that review takes.
Raw results for every runThe protocol and its logged deviations
Choosing between Claude Code and Codex
Choose Claude Code if
- You deploy through Google Cloud or Microsoft Foundry, which Claude Code documents as routes beside Anthropic and Amazon Bedrock.
- Accepted work matters more than token spend, since Claude Code with Opus 5.5 leads the Terminal-Bench 4.0 board.
Choose Codex if
- Your security team wants to read the client it approves, and the Codex CLI is developed in the open on GitHub.
- Token spend is the constraint, since Codex's Terminal-Bench 4.0 run on GPT-6.1 Sol cost a fraction of Claude Code's.
Side by side
| Dimension | Claude Code | Codex |
|---|---|---|
| Where it runs | Terminal CLI, VS Code and JetBrains extensions, desktop app, web, Claude mobile app, Slack, and GitHub Actions or GitLab CI12 | ChatGPT desktop, web, and mobile apps, the Codex CLI, an IDE extension for VS Code-compatible editors, Xcode and JetBrains integrations, Codex Cloud, GitHub, Slack, and Linear161819 |
| Default permissions | Auto mode is the starting mode in the terminal and VS Code, with a classifier reviewing actions; the shell sandbox is off by default67 | Local commands run sandboxed in workspace-write mode with network access off; approval prompts go to the engineer, or to a reviewer agent an admin can require202122 |
| Enforcing the sandbox | Managed settings can turn the shell sandbox on, refuse to start without it, and block unsandboxed retries; file tools follow permission rules the same settings can lock79 | requirements.toml can limit sandbox modes and approval policies, so full access is refused; the sandbox covers spawned commands and file operations2122 |
| Policy delivery | An MDM profile or managed file on each machine, or server-managed settings from the claude.ai console on Team or Enterprise, which apply one policy to the whole organization910 | A system requirements.toml or macOS MDM profile on every plan, or Agent Security policies on Business and Enterprise, with overrides by user, group, or role; custom roles need Enterprise1722 |
| Cloud sessions | Anthropic-hosted sessions run in isolated VMs with network access limited by default. They take policy from server-managed settings, since device policy does not reach them. Self-hosted environments also read a managed file. On Enterprise, custom roles set who may use cloud sessions and Remote Control (Claude Code 2.1.310, Oct 23, 2026)911 | Agent Security policies carry Codex Cloud execution settings, and each cloud environment's internet settings apply separately2223 |
| Cloud deployment | Anthropic, Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry30 | OpenAI, or Amazon Bedrock for local clients; Codex Cloud is not available through Bedrock32 |
| Sandbox platforms | macOS, Linux, and WSL2; on native Windows, commands run unsandboxed7 | macOS, Linux, WSL2, and native Windows in PowerShell; managed network rules have limited Windows support2122 |
| Individual priceList prices in US dollars, excluding tax. Included usage differs by plan and is not directly comparable. | Claude Pro: US$20 per month billed monthly, or US$17 per month billed annually; Max from US$100 per month3 | ChatGPT Plus: US$20 per month; Pro at US$100, US$200, or US$500 per month17 |
| Team price | Claude Team: US$25 per seat per month billed monthly, or US$20 billed annually; Premium seats US$125 or US$1003 | ChatGPT Business: US$25 per user per month billed monthly, or US$20 billed annually (2+ users)17 |
| Enterprise | US$20 per seat per month, billed annually, plus usage at API rates; minimum 20 seats34 | Custom pricing through sales, with credit-based or token-based options17 |
| Usage limits | Plan usage shared with Claude chat, reset on five-hour and weekly windows5 | Local messages per five-hour window vary by model on Plus and Business; Pro has no five-hour limit; weekly limits may apply17 |
| Models | Anthropic's Claude models; defaults to Opus 5.5 on paid plans and the API14 | OpenAI models, including GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, and GPT-6 Luna27 |
| Project instructions | CLAUDE.md, or AGENTS.md when no CLAUDE.md exists13 | AGENTS.md, read before any work25 |
| Pull request review | Code Review on Team and Enterprise for GitHub, billed on tokens through usage credits with no flat per-review price; it never approves or blocks a pull request1531 | @codex review on GitHub, or automatic reviews; flags only P0 and P1 issues26 |
| Training on your data | Not under commercial terms (Team, Enterprise, API); Free, Pro, and Max train when the setting is on12 | Not by default on Business, Enterprise, Edu, or API; Plus and Pro do not carry that default1724 |
| Independent benchmarks | Terminal-Bench 4.0, 64.85% with Opus 5.5, Sep 22, 2026; OpenHands SWE-bench Verified, 74.4% with Claude Opus 4.6 at US$1.14 a task, agent v1.15.0, Mar 27, 20263439 | Terminal-Bench 4.0, 58.18% with GPT-6.1 Sol, Sep 29, 2026; OpenHands SWE-bench Verified, 78.0% with GPT-5.5 at US$1.17 a task, agent v1.19.1, May 4, 20263339 |
| Agent pull requests merged | 84.3%, estimated across 489 open-source Python repositories in a July 2026 study40 | 73.5% in the same study40 |
What practitioners report, side by side
Each product's figures come from its own practitioners, for the group you pick.
Overall signal
Leaders and teams rate Claude Code +72, 15 points above Codex at +57. Most of the gap is in praise, with 42 of Claude Code's 55 sources positive against 24 of Codex's 39. Each has 3 negative.
The score counts the sources from leaders and teams that take a side and is how far positive votes lead negative ones, per 100 votes. A confirmed leader casts three votes, another confirmed practitioner two and any other source one, so Claude Code's +72 rests on votes split 66 positive, 18 mixed and 3 negative and Codex's +57 on 41, 17 and 5. A lead of a fifth of the votes reads positive and a lead of half strong positive, with the same lines below zero. The dots show each source once, positive, mixed, negative. Use a task pilot to measure accepted work and review time.
Footprint on the Agentic Software Development stack
Both cover the same 12 layers at the same depth. Coverage is each product's placement on this stack, as its product page shows it. Core is a job the product owns; Supports and Touches are jobs it helps with. Coverage says nothing about how well a product does them.
| Stage | Claude Code | Codex |
|---|---|---|
| Plan1 layer | Supports 1 | Supports 1 |
| Build4 layers | Core 4 | Core 4 |
| Validate4 layers | Supports 3, Touches 1 | Supports 3, Touches 1 |
| Ship2 layers | Touches 2 | Touches 2 |
| Operate1 layer | Touches 1 | Touches 1 |
Show all 12 layers
| Layer | Claude Code | Codex |
|---|---|---|
| Plan | ||
| Work planning | Supports | Supports |
| Build | ||
| Codebase context | Core | Core |
| Coding | Core | Core |
| Agent runtime | Core | Core |
| Tool execution | Core | Core |
| Validate | ||
| Debugging | Supports | Supports |
| Testing | Supports | Supports |
| Code review | Supports | Supports |
| Application security | Touches | Touches |
| Ship | ||
| Source control | Touches | Touches |
| CI/CD | Touches | Touches |
| Operate | ||
| Observability | Touches | Touches |
What practitioners praise
Among leaders and teams, Claude Code alone has four praise themes that reach 5 sources from 3 authors. Codebase Understanding and Large Refactors lead, at 9 of 9 and 8 of 9. Both carry Developer Experience. It is praised in all 7 Claude Code sources that discuss it, against 7 of 13 for Codex. Code Quality reaches 5 sources from 3 authors only for Codex, at 7 of 8. Claude Code needs a pilot on the same repository tasks before you choose on it.
| Praised for | Claude Code | Codex |
|---|---|---|
| Developer Experience | 7 of 7 | 7 of 13 |
| Codebase Understanding | 9 of 9 | 3 of 3 so far |
| Large Refactors | 8 of 9 | Not a theme in its sources |
| Multi-Step Execution | 5 of 6 | 4 of 4 so far |
| Enterprise Administration | 4 of 5 | Not a theme in its sources |
| Code Quality | Not a theme in its sources | 7 of 8 |
Each count is the sources that praise a theme, or raise it as a concern, out of those that discuss it. A row pairs the two products when both carry a theme under the same or an equivalent name. A count ending in "so far" has under 5 sources from 3 authors among leaders and teams. "Not a theme in its sources" means GILD found no theme of that name in that product's sources.
What practitioners raise as concerns
Claude Code's sources raise Requires Strong Review more often than Codex's. It is raised in 15 of the 22 Claude Code sources that discuss it, against 1 of 9 for Codex. Claude Code alone has three concern themes that reach 5 sources from 3 authors. Inconsistent Results on Large Tasks and Context Management lead, at 6 of 7 and 6 of 13. Speed reaches 5 sources from 3 authors only for Codex, at 3 of 5. Claude Code needs a pilot on the same repository tasks before you choose on it.
| Raised as a concern | Claude Code | Codex |
|---|---|---|
| Requires Strong Review | 15 of 22 | 1 of 9 |
| Usage / Cost | 4 of 10 | 7 of 13 |
| Inconsistent Results on Large Tasks | 6 of 7 | 2 of 2 so far |
| Context Management | 6 of 13 | Not a theme in its sources |
| Permissions & Safety | 2 of 10 | Not a theme in its sources |
| Speed | Not a theme in its sources | 3 of 5 |
What to verify before you buy
Usage on the plan you would buy
Run a week of real work on that plan and note who hits a limit first. Claude Code shares its limits with Claude chat on five-hour and weekly windows. Codex limits local messages per five hours by model, and OpenAI says cloud tasks may use more of the allowance.517
Sandbox enforcement on every machine
Deploy the policy that requires the sandbox to one squad and confirm a blocked command stays blocked on each operating system in the fleet. Include a Windows machine, where the two differ most.722
Policy in cloud sessions
Start a cloud session under the policy and check what it runs with. Claude Code's Anthropic-hosted sessions read only server-managed settings, and each Codex Cloud environment keeps its own internet settings beside Agent Security.922
Accepted changes on your own code
Give both agents the same repository tasks for one sprint and count the changes reviewers merge without rework, with the token spend for each. Public results favor Claude Code on accepted work and Codex on token cost, so your own merge rate per dollar settles which advantage matters.3940 Practitioners split. One engineer reports that Codex finds two to five correctness bugs in work Claude called complete, and another moved to Claude Code for fewer tool bugs and better shell use.3536 Chandler Nguyen canceled Claude Max to test Codex at US$20 a month, writing that the two agents' execution quality is converging.37
Training terms on the plan you sign
Confirm every engineer signs in through the business plan before company code goes in. The table gives each plan's training terms.
Enterprise quotes at your seat count
Ask both vendors to quote your seat count against the list prices in the side-by-side table.
Review cost
If automated review is in the pilot, set a monthly spend limit for Claude Code's Code Review first. A repository added from the admin page reviews every push, and Anthropic says reviews average US$15 to US$25 each.1541 Codex reviews when someone writes @codex review on GitHub or automatic reviews are on, and flags only P0 and P1 issues. OpenAI meters those GitHub reviews as Code Review usage, and reviews run locally draw on the general limits.1726
41 sources
- Claude Code docs: Overview
- Claude Code docs: Platforms
- Claude pricing
- Claude Enterprise
- Claude Code docs: Costs
- Claude Code docs: Security
- Claude Code docs: Sandboxing
- Claude Code docs: Settings
- Claude Code docs: Deploy managed settings
- Claude Code docs: Server-managed settings
- Claude Code docs: Claude Code on the web
- Claude Code docs: Data usage
- Claude Code docs: Memory
- Claude Code docs: Model configuration
- Claude Code docs: Code Review
- Codex docs: Overview
- Codex docs: Pricing
- Codex docs: IDE extension
- Codex docs: Cloud
- Codex docs: Agent approvals & security
- Codex docs: Sandboxing
- Codex docs: Managed configuration
- Codex docs: Agent Security
- OpenAI: Business data privacy, security, and compliance
- Codex docs: AGENTS.md
- Codex docs: GitHub code review
- Codex docs: Models
- Codex docs: Open source
- Claude Code docs: Permission modes
- Claude Code docs: Enterprise deployment overview
- Claude Code docs: Code Review costs and usage
- Codex docs: Use ChatGPT Work and Codex with Amazon Bedrock
- OpenHands Index: Codex on GPT-5.5, SWE-bench Verified (submitted May 4, 2026)
- OpenHands Index: Claude Code on Claude Opus 4.6, SWE-bench Verified (submitted Mar 27, 2026)
- Hacker News: Claude Code after trying Codex (Oct 20, 2025)
- Hacker News: Codex reviews Claude's work (Jul 3, 2026)
- Chandler Nguyen: Claude Max to Codex (Apr 3, 2026)
- GILD same-task test: Claude Code and Codex, Oct 25, 2026
- Terminal-Bench 4.0 leaderboard (Oct 23, 2026)
- arXiv: How Do AI Coding Agents Contribute to Software Development? An Empirical Study of Agentic Pull Requests (Jul 23, 2026)
- Claude: Code Review for Claude Code