← Blog

Claude Code vs Codex: Two Agents That Converged

September 4, 2026

Claude Code and Codex are the two serious terminal coding agents, and they look almost identical from the outside: install a CLI, describe a task, watch it read files and run commands.

The honest finding is that they have converged. Every distinction people reach for in this comparison — local versus cloud execution, application-level versus OS-level sandboxing, one being more extensible than the other — describes an earlier version of these products rather than the current ones.

Both now run on your machine and in isolated cloud environments. Both sandbox at the operating-system level. Both support skills, hooks, subagents, and MCP.

What's genuinely left is short, and neither item is architectural:

  • Licensing. The Codex CLI is open source; Claude Code is not.
  • Model family and subscription. Claude models or OpenAI models, and which one you already pay for.

That's an unsatisfying answer if you wanted a decisive technical argument, and it's the accurate one. For most teams this decision now comes down to which subscription you hold and whether reading the CLI source matters to you.

Quick comparison

Claude CodeCodex
Runs locallyYesYes
Runs in the cloudYes — Anthropic-managed, isolated VMsYes — isolated containers
OS-level sandboxingYes — Seatbelt on macOS, an equivalent on Linux/WSL2Yes
SkillsYes — SKILL.mdYes — SKILL.md
HooksYesYes
SubagentsYesYes
MCPYesYes
Open sourceNoCLI is
ModelsClaudeOpenAI

Local and cloud: both, on both

The old framing had Claude Code as the local agent and Codex as the one that delegates. That's out of date.

Claude Code runs locally and in the cloud. Per Anthropic's documentation, Claude Code on the web runs tasks on Anthropic-managed cloud infrastructure, in isolated VMs, with sessions that persist after you close the browser. You can start a cloud session from your terminal with --cloud, run several in parallel, and pull one back down to your machine with --teleport.

Codex runs locally and in the cloud in much the same shape — a local CLI plus isolated containers with network access off by default.

So the useful question isn't which product can delegate. Both can. It's the older, duller one: supervise locally when the problem is entangled with your environment, delegate to the cloud when the task is well-specified and you want it reproducible or parallel. That rule applies to whichever of the two you pick.

Sandboxing: both enforce at the OS level

Both agents run shell commands, which is the entire reason they're useful and the entire reason they're risky. A comparison that grants OS-level isolation to one and not the other is describing an older product.

Claude Code's sandboxed Bash tool provides filesystem and network isolation enforced by the operating system — Seatbelt on macOS, and a sandbox built on additional packages on Linux and WSL2. As the documentation puts it, you define which files and network domains commands can touch, and the operating system enforces that boundary for every Bash command and its child processes. Permission modes and hooks sit on top of that as a policy layer; they aren't a substitute for it.

Codex likewise sandboxes execution at the operating-system level, with network disabled by default.

Both also let you layer policy on top of that boundary through hooks — blocking a tool call, automating a permission decision — so neither has an advantage here either. The sandbox is the guarantee; hooks are how you express intent above it.

The extension points now match

This is where the previous version of this article was wrong, so it's worth being specific rather than vague.

Both agents support the same four categories, and both document them:

  • Skills — packaged instructions and scripts in a SKILL.md directory. Both build on the same open agent-skills format, so a skill's structure is familiar across either. Our guide to Claude skills covers the shape.
  • Hooks — scripts that fire on lifecycle events and can block a tool call, automate a permission decision, or feed output back into the loop. Codex documents an extensive set covering tool use, permission requests, compaction, session start and end, and subagent lifecycle.
  • Subagents — offloading research or parallel work into a separate context window.
  • MCP — connecting external tools and servers.

If you've read that one of these is "a platform" and the other is "just configurable," that claim no longer survives contact with either vendor's documentation. Differences in ergonomics and maturity certainly exist, but they're a matter of taste rather than capability, and they change with each release.

What genuinely remains

Openness. The Codex CLI is open source. If you need to read exactly what the agent does before letting it near your codebase, or fork it, that has no equivalent on the Claude Code side.

Models and subscription. Claude models versus OpenAI models, and which subscription your team already holds. In practice this decides more evaluations than anything else on this page.

Surface coverage. Both span CLI, IDE, and cloud. Codex's documentation covers its range; Anthropic's covers Claude Code's.

What about benchmarks?

Published comparisons quote win rates, SWE-bench scores, and token-efficiency ratios. Treat all of it as a snapshot with a short shelf life — both labs ship model updates on a cadence that invalidates these numbers within months, and the figures circulating in listicles frequently contradict each other.

Product shape ages too, as this article's own history shows: the local-versus-cloud and harness-versus-kernel distinctions that comparisons were built on a year ago are simply no longer true of either product. Verify against each vendor's current documentation rather than trusting any comparison, including this one, and give both a week on your own codebase.

The step before either

Both tools assume a working development environment, a repository that runs, and enough context to judge what the agent did. For professional developers that's fine.

For everyone else it's the wall. The most common failure with these tools isn't choosing wrong — it's watching someone share a Claude Code configuration or an agent setup that does exactly what you need, and never getting it running. Dependencies, keys, environment, assumptions the README didn't write down.

Taku addresses that specific gap: an AI-native desktop workspace where you mirror an AI app or workflow that already works, run it on your own machine, and remix it into your own — without reproducing someone else's environment first. It's not a coding agent and doesn't compete with either of these. It's for the step where people stall before a coding agent is any use. Taku is in Beta, and the Mac app is available now.

FAQ

Can I use both?

Yes, and plenty do. They don't conflict — both are CLIs, and both can run locally or dispatch work to the cloud, so you can pick per task rather than per product.

Which is safer to let run unattended?

Both sandbox at the operating-system level with network restrictions, and both support hooks that can block a tool call or automate a permission decision. Neither has a structural safety advantage, and neither should run unattended against production without deliberate guardrails.

Which writes better code?

The honest answer is that it depends on the task and changes with every model release. Published win rates disagree with each other and age within months. Trial both on your own repository.

Do they need different subscriptions?

Yes, they're separate products from separate companies. Both offer tiered plans, and pricing changes often enough that you should check current terms directly rather than trusting a comparison post. Given how closely the two now match on capability, which subscription you already hold is a legitimate deciding factor.

Which handles a large monorepo better?

Both index and navigate large repos, and both can run several isolated cloud tasks in parallel. Differences show up in retrieval quality on your specific code, which is why a trial beats a benchmark.

What if I'd rather work in an editor?

Both offer IDE surfaces alongside the CLI. If you want the AI built into the editor itself rather than invoked from it, Claude Code vs Cursor covers that, and AI coding assistants compared maps the full category.