Codex or Claude Code: how to choose in 2026
Three questions help you choose between Codex and Claude Code: what you must audit, where your secrets travel, who reviews the output. Notes from real deployments.
Codex from OpenAI and Claude Code from Anthropic are the two coding agents I deploy most often for my clients. On paper, they do the same job. The choice between them is not settled by a feature list, but by three questions few teams ask before installing either.
The essentials in five points
- The common ground is wide: reading and editing code, running commands, MCP, skills, subagents. Comparing those features no longer settles anything.
- Codex opens its harness and closes its context: Apache 2.0-licensed source code, but compaction and conversation state encrypted server-side.
- Claude Code closes its harness and keeps the record local: proprietary code, but transcripts and compaction readable on your machine, per-tool approvals. The context still goes to Anthropic on every exchange.
- Neither is fully auditable. The real question is what your organisation must be able to verify.
- Using both is often the best setup: one produces, the other reviews it.
What both do identically
Since summer 2026, Codex and Claude Code both read a repository, edit files, run commands, connect to MCP servers, load skills and launch parallel subagents.
On 20 August 2026, Charlie Marsh, author of the uv and ruff tools, even rewrote Codex’s startup, which now launches roughly twenty-five times faster.
What still separates the two sits below the feature line, in how each one splits what you can verify from what you have to take on trust.
First question: what do you need to audit?
Codex ships under the Apache 2.0 licence. You can read how the context is assembled, how tools are injected, how the agent loop runs. In exchange, history compaction and conversation state live on OpenAI servers in an encrypted form.
Claude Code makes the opposite trade. The harness is closed, you do not read its code. But the record of the work stays on your machine: transcripts and compaction happen locally, in files you can open.
That does not mean your data stays with you. On every exchange the context goes to Anthropic, and cloud sessions and scheduled routines run on its infrastructure.
A client who needs to audit the tool’s code picks Codex. A client who needs to reconstruct what the agent saw and sent picks Claude Code. A compliance officer in a regulated sector usually wants the second: what they must demonstrate to a regulator is which information left, and where.
Either way, the contract with the vendor matters more than the tool: retention, location, reuse of data for training.
No one should promise a client that a coding agent is “fully auditable”. Each lets you verify one part of how it works and keeps the other closed.
Second question: when does the agent see your secrets?
For its own deployment, OpenAI documents a two-phase runtime for Codex: secrets are available during setup, then removed before the agent runs, with the network cut off. The logic is least privilege, designed for enterprise deployment.
Both tools have approval policies and hooks. Claude Code puts forward per-tool approvals and hooks that fire before each action: you write the rule, it applies on every call.
Both approaches are defensible. The trap lies elsewhere: a convenience option can create an invisible cost. In Codex, the automatic approval option hands validations to a separate review agent that consumes quota without saying so.
Before installing, write three lines: which secrets the agent sees, at what moment, and what it may execute without a human approving.
Third question: who reviews the work
This is the question least often asked.
In my deployments, the division of roles settled itself. Claude Code produces the code that reaches production, with written permissions and a human who validates.
Codex reviews: a proposal, a module or a scoping note is submitted to a second automated review before it leaves. Two different models do not make the same mistakes, and do not let the same ones through.
From one tool to the other, the method stays the same: describe the task, define what the agent may change, review before approving.
Using both tools is no compromise: you get a cross-review you would not have time to carry out yourself.
Where the two tools are heading
Since June 2026, both tools have been leaving the terminal, in opposite directions.
| Codex | Claude Code | |
|---|---|---|
| Direction | business agent platform | session orchestration |
| Recent additions | agent dashboard, session resume and archive (August) | Projects, parallel cloud threads with shared memory (beta); scheduled routines that run in the cloud with your computer off (September) |
| Opening to non-developers | role plugins, recording a task shown once (June) | Cowork, Anthropic’s app for non-developers; a submission portal for plugins in the Claude directory (September) |
| Infrastructure | Amazon Bedrock added as a provider (August) | Amazon Bedrock, Google Vertex AI and Microsoft Foundry, plus cloud sessions at Anthropic |
The Codex shift deserves an executive’s attention. A plugin installs a business role in one command, and a recording feature turns a task demonstrated once into a reusable skill. The audience is no longer only the engineer. Part of these features is still in beta: test them with a pilot team, do not roll them out yet.
The moment a non-technical colleague can create a skill, the question becomes one of governance: who may create one, who reviews it, and what it is allowed to touch.
The cost that is not on the pricing page
The starting point differs. Codex is included in every ChatGPT plan, within the plan’s usage limits, then billed at API rates once you use an API key. At Anthropic, Opus 5.5 cut API prices by 40% compared with Opus 5, mostly on cache reads, which make up the bulk of an agent’s work.
Three items then escape the sticker price.
- Very long contexts. They are available and they are paid for: check how your plan counts them before turning them on by default.
- Convenience options. An automatic review, a verification subagent, a generous compaction mode: each consumes quota, and none flags it at the moment you switch it on.
- Human review time. It does not disappear: it shifts from writing to reviewing. A team that has not decided who reviews will pay that time in incidents.
Measure a month of real usage before sizing a budget. Five developers on an active repository do not consume what a pricing table suggests.
Four situations, four answers
- A structured software team with code review. Claude Code first, for harness maturity and per-tool approvals. Codex as a second pass on sensitive deliverables.
- An SME with no developer, automating office work. Codex, for business plugins and task recording, or Cowork on the Anthropic side. With a written rule from day one on who creates a skill and who validates it.
- A regulated firm or organisation. Claude Code, because the record of what the agent saw and sent is readable locally and can be shown to an auditor. Plus a documented data path, contract included, before any deployment.
- A large group, with a CIO, procurement and compliance. The tool comes after the contract. Both vendors have an enterprise offer; what decides is what your DPO and CISO must be able to prove: data retention and location, single sign-on, centralised logging, account administration. Scoping happens with them, before the first pilot.
In all four cases, the same step comes before installation: list the team’s real friction points, one by one, with their cost in time. That list tells you whether you need a coding agent, and which team should adopt it first.
Going further
The full CLI agent comparison also covers Gemini CLI, Hermes Agent and OpenClaw, with versions and dates. The Codex and Claude Code in production programmes start from your teams’ own cases.
To scope a deployment before buying licences, the first agent in production engagement starts from one specific task in your team. Certifications held, their scope and their limits are listed on the certifications page.
Frequently asked questions
What is the difference between Codex and Claude Code?
Both read your code, edit it and run commands from a terminal, with MCP support, skills and subagents. Three trade-offs separate them. Codex is open source under the Apache 2.0 licence and written in Rust, but its context compaction and conversation state live on OpenAI servers, encrypted. Claude Code has a closed harness, yet keeps a local, readable record of what the agent saw and sent; the context itself goes to Anthropic on every exchange. Codex is moving towards business plugins for non-developers, Claude Code towards orchestrating parallel cloud sessions.
Codex or Claude Code: which one for a software team?
For a structured team that reviews what it ships, Claude Code remains the more mature choice: per-tool approvals, hooks, a local record of exchanges, a settled skills ecosystem. Codex wins when you need to audit the harness code itself, when your rules require an open licence, or when you deploy on infrastructure you control, with Amazon Bedrock a built-in provider since August 2026.
Should a team pick only one coding agent?
No, and using them together is often the best setup. One writes, the other reviews: submitted to a second automated review, a proposal or a module escapes the first agent's blind spots. What must stay single is the written rule: who approves what before code reaches production.
Is Codex only for developers?
Not since 2026. OpenAI added role-based plugins that install without code, and a recording feature that turns a task demonstrated once into a reusable, editable skill. The stated audience now includes non-technical users in companies. That shifts the question from tooling to governance: who is allowed to create a skill, and who reviews it.
What do these agents really cost?
The sticker price is not the cost. On the subscription side, Codex is included in ChatGPT plans, from Free to Enterprise, within each plan's usage limits. At Anthropic, Opus 5.5, released on 22 September 2026, costs 40% less than Opus 5 on the API, mostly on cache reads. A convenience option such as automatic review consumes quota without flagging it, until you measure it. Budget on a month of real usage, not on the pricing page.