AI / Comparison
Two terminal agents, two philosophies, one decision
The verdict
Claude Code is the better agent if you intend to configure it. Its extension surface - memory files, skills, subagents with their own tools and permissions, more than thirty hook events, MCP servers, and plugins that package all of it - is the deepest in the category, and a team that invests a day in it gets something no other tool matches. Codex is the better agent if you intend to trust it. It separates what the agent is allowed to do from when it stops to ask, so you can hand it genuine autonomy inside a boundary you set, and it comes free with the ChatGPT subscription a lot of teams already pay for. Configure, or contain - that is the choice.
Adoption is not close, and it is worth knowing which way. JetBrains' January 2026 survey of over 10,000 professional developers put Claude Code at 18 percent workplace adoption and Codex at 3 percent, with Claude Code recording a 91 percent satisfaction score and an NPS of 54. Codex is growing fast from a small base; Claude Code got there first and is the tool most people mean when they say "terminal agent".
Claude Code vs Codex on the dimensions that decide it
Verified against both vendors' documentation in August 2026. Both ship a CLI, an IDE extension, and a cloud surface; the differences are in the model of control.
| Dimension | Claude Code | OpenAI Codex |
|---|---|---|
| Default model | Depends on your plan. Aliases for fable, opus, sonnet, and haiku, plus an effort dial from low through max. Opus 5 shipped July 24, 2026. | GPT-5.6, generally available July 9, 2026 in Sol, Terra, and Luna tiers. Sol is OpenAI's stated best coding model. |
| Safety model | Permission modes from plan through acceptEdits, auto, dontAsk, and bypassPermissions, plus allow and deny rules matching tool arguments. | Two orthogonal dials: sandbox_mode controls filesystem and network capability, approval_policy controls when it asks. Cleaner separation of concerns. |
| Repo instructions | CLAUDE.md with scope layering, @ imports up to four hops deep, and path-scoped rules in .claude/rules/. | AGENTS.md, generated by /init. The convention most other agents also read. |
| Parallelism | Background sessions with an agent view, subagents that can run in isolated git worktrees, and a bundled skill that fans a large change out across many of them. | Subagents reached general availability March 14, 2026, with explorer, worker, and default roles running concurrently in isolated sandboxes. |
| Extensibility | Skills, custom subagents, more than thirty hook events with five hook types, MCP servers, LSP servers, background monitors, and installable plugins with marketplaces. | Custom agents, MCP servers, and a TOML config with profiles. Genuinely capable, notably smaller surface. |
| Non-interactive mode | claude -p with JSON or streaming output, JSON Schema validation, tool allowlists, turn limits, and a hard dollar budget per run. | codex exec, read-only by default, designed for workflows and CI with an explicit sandbox. |
| Surfaces | CLI, IDE integration, desktop app, cloud sessions, and remote control from a phone. | CLI, VS Code extension, web, iOS, and a GitHub code reviewer, all on one ChatGPT login. |
| Pricing | Claude Pro at 20 dollars a month; Max at 100 or 200 for 5x or 20x usage. Metered over a rolling window plus a weekly cap. | Included with a ChatGPT subscription rather than sold separately. Plus at 20 dollars covers CLI, IDE, and web; Pro buys a multiple of that. |
When each one is the right call
Choose Claude Code when
- You want the agent to enforce your conventions, not merely be told about them. Hooks run regardless of what the model decided.
- The team will build shared tooling - skills, subagents, a plugin published to a private marketplace - and wants it version-controlled and distributable.
- The work is long and multi-file, where context management and compaction quality decide whether a two-hour session stays coherent.
- You need a hard spend ceiling per unattended run, not just a turn limit.
- You want fine-grained memory: scoped rules that load only for matching files, so a monorepo does not put every team's conventions in every prompt.
Choose Codex when
- Your team already pays for ChatGPT. Codex is included rather than an additional line item, which for a fifty-person team is the entire argument.
- You want to grant real autonomy safely. Setting capability and consent independently is a better mental model than one blended permission mode, and it is easier to explain to a security reviewer.
- The workflow crosses surfaces: start on the web, continue in the CLI, review on GitHub, check from your phone, all under one login and one quota.
- Your repo already has an AGENTS.md and you would rather not maintain a second instruction format.
- You want parallel work with clear roles out of the box - explorer for read-only analysis, worker for read-write execution - without defining subagents yourself.
- You prefer a smaller configuration surface. Fewer primitives means fewer things to get wrong, and Codex is deliberately less of a construction kit.
What the benchmarks do and do not settle
Both vendors publish agentic coding scores, and as of August 2026 the top results on Terminal-Bench 2.1 sit in the high eighties for both families, with the ordering flipping depending on the harness, the effort setting, and which variant is being measured. Treat any specific leaderboard position as a claim with a date attached, not a property of the tool. The practical gap between these two agents on your codebase is smaller than the gap between a well-written rules file and no rules file.
Something more interesting is visible in how the vendors talk about their own results. Anthropic's Claude Opus 5 announcement leans on agentic and computer-use evaluations - Frontier-Bench, CursorBench, OSWorld, an automation benchmark - rather than the SWE-bench numbers that dominated 2025 marketing. That is a signal about where the frontier moved: the question is no longer "can it patch this issue" but "can it run for two hours without losing the plot".
Where Claude Code genuinely leads: the primitive set. Nothing else has hooks with five delivery types, subagents that can be pinned to a cheaper model with their own permission mode and a temporary git worktree, and a plugin system with marketplaces for distributing all of that to a team. If you want the agent to work the way your organization works, this is the tool that lets you say so.
Where Codex genuinely leads: the safety model and the bundle. Separating sandbox_mode from approval_policy is the cleanest design in the category - one answers "what could it do", the other answers "when does it stop and ask", and confusing those two is exactly how teams end up either drowning in prompts or granting blanket bypass. Add that Codex arrives free with a subscription many companies already hold, and the procurement conversation is over before it starts.
The honest closing note is that they are converging. Codex shipped subagents in March; Claude Code has had them longer. Claude Code reads CLAUDE.md; Codex reads AGENTS.md; Claude Code will now import the other agent's configuration for you. Nothing here is a permanent moat, and a repository with a good AGENTS.md, a fast test suite, and CI that re-runs everything is portable between them in an afternoon. Optimize for that portability rather than for the current leaderboard.
Where to go next
If Claude Code won, the Claude Code cheatsheet is the fastest route to the parts that make it worth the configuration: permission modes, hooks, subagent frontmatter, and the headless flags a CI job needs. Either way, the AI-assisted development workflow guide covers the spec-first discipline and CI guardrails that both agents assume.
Both connect to your own tools through the same protocol - see the Model Context Protocol explainer. For the model layer beneath them, read Claude vs GPT for coding. If you also want an editor alongside the terminal, Claude Code vs Cursor covers that pairing and the field guide covers everything else.