# Claude Code vs Codex: which agentic coding tool to choose in 2026

> Claude Code (Anthropic) vs Codex (OpenAI): surfaces, models, sandbox and approvals, MCP, cloud, code review, CI/CD, and pricing, compared in practical detail.
> Author: Roman Belov · Published: 2026-10-14 · Source: https://futurecraft.pro/blog/claude-code-vs-codex/

Two tools, two philosophies. Claude Code is an agent that grows into your terminal and into one machine. Codex is a command center that spreads work across a fan of parallel tasks and surfaces.

One clarification up front. There's a separate category, AI-IDEs: Cursor and its siblings, editors with AI baked in. Different conversation, different article. This one is about two top agentic tools that aren't editors. They read code, edit files, run shell commands, check the result, and come back with a finished diff or pull request.

This article comes out of working with both tools. Concrete numbers, real limits, no marketing. To skip ahead: the difference between them comes down to where the code runs and what the agent can do without your permission, not which model is smarter. That matters more than a model comparison table.

## What each one is

### Claude Code

Claude Code is Anthropic's agentic tool. Historically a terminal CLI, and that's still the core. But in 2026 it doesn't stop at the terminal: there's a desktop app (macOS and Windows, with a beta for Ubuntu and Debian) with three areas, Chat, Cowork, and Code; there's an IDE extension; there's a web interface at claude.ai/code; there's Remote Control for driving a local session from your phone.

You start it with `claude` in the project root. It sees the file structure, reads and edits files, runs commands, and drives git. Built-in tools: Read, Write, Edit, Bash, Glob, Grep, Agent, WebSearch, LSP. It isn't tied to an editor: works with Vim, VS Code, JetBrains, or no editor at all.

### Codex

Codex is OpenAI's agentic tool. Also not a single artifact, but a family of surfaces around a shared core: CLI, desktop app (macOS and Windows), IDE extension, cloud/web, and mobile access through ChatGPT.

Codex's conceptual center is the desktop app, not the terminal. It's pitched as a command center for agentic coding: it launches tasks in parallel (often isolating them through worktrees), tracks progress, and funnels results into a review stream where you accept, fix, or reject them.

The difference already shows. Claude Code's center of gravity is one session in one terminal. Codex's is a control panel with dozens of tasks radiating out of it.

## Surfaces and platforms

Both platforms cover roughly the same set of surfaces, but they put the emphasis in different places.

**Claude Code** lives in the terminal (the core), in the IDE through an extension, in the desktop app (Chat / Cowork / Code), and on the web. It supports macOS, Linux, and Windows, both natively (PowerShell, CMD, WinGet) and through WSL2. On top of that sits Remote Control: a sync layer that ties a local terminal session to the mobile app (iOS, Android) and the web interface. Your local MCP servers, skills, and configs are available through it too, so the phone drives a real machine, not a cloud copy. Plus Slack integration and CI usage.

**Codex** puts the desktop app at the center as a command center. Then the CLI, the IDE extension, cloud/web. There's control of a connected computer from the ChatGPT mobile app, work on SSH hosts, and a Windows app that runs natively (PowerShell plus a Windows sandbox, WSL optional). Cloud tasks run on OpenAI's side.

Simplified: Claude Code pulls control toward the local machine (even when you drive from a phone, your Mac is underneath). Codex is spread more evenly across local, SSH, and cloud.

## Models and reasoning

**Claude Code** runs on Anthropic models. On the paid plans (Pro, Max, Ultra, Team, Enterprise) and in the API the default is Opus 5.5 (`claude-opus-5-5`, released September 22, 2026, $4/$20 per 1M tokens), which Anthropic positions for long-running agentic coding. Below it: Sonnet 5.5 (`claude-sonnet-5-5`, $2/$10, the alias for daily coding) and Haiku 5.5 (`claude-haiku-5-5`, from $0.10/$0.50, for simple high-volume tasks). Above it: Fable 5.1 ($10/$50), which is never the default and has to be picked explicitly (`/model fable`); it's meant for the hardest and longest autonomous sessions. Opus 5, Sonnet 5, and Haiku 4.5 are now legacy but still available. In practice Opus goes to hard tasks, Sonnet to simpler ones where you want to save, Haiku to batch operations, and Fable to the rare task where Opus at higher effort still falls short.

**Codex** doesn't have its own model branch: it runs on the shared GPT-6 lineup. Per the Codex docs, GPT-6 Astra is the most capable model, GPT-6.1 Sol delivers near-Astra performance at a lower cost for repeated long-running work, GPT-6.1 Terra is a fast, efficient model for writing, visual understanding, and computer use, and GPT-6 Luna is the most efficient one for focused high-volume tasks. If you don't pick a model, the app, CLI, or IDE extension uses a recommended one. Older models are leaving Codex under ChatGPT sign-in: gpt-5.4 retired on August 31, 2026, and GPT-5.5 retires on October 14, 2026. One distinct plus for Codex is manual reasoning effort: from Light (Low in the CLI) through Medium, High, and Extra High to Max, plus Ultra, which uses subagents on separate parts of a task in parallel (Luna doesn't support Ultra).

A caveat about model numbers: the lineups update literally every month, and any specific ID goes stale fast. What doesn't go stale is the role layout: Claude has tiers for different classes of work, Codex has a tiered lineup plus a dial for reasoning depth.

## Agent architecture

This is where the philosophies diverge most.

**Claude Code** is built around an agent loop: gather → act → verify. Collect context, take an action, check the result, repeat. There's plan mode, where the agent states a plan first and executes after. There are subagents, specialized workers with isolated context. There are Agent Teams (opt-in), a team of Claude sessions that Claude spawns and supervises. And dynamic workflows on top of all of it. The mental model is simple: one main session with managed workers underneath.

**Codex** is built around parallelism and delegation. There's the `/goal` command: it sets a persistent target that Codex keeps attached to the chat while a larger task runs (it can be edited, paused, resumed, and cleared). There are cloud tasks, where the work moves to the cloud. There are worktrees as the isolation mechanism for parallel tasks. And there's Handoff, moving a thread between Local and Worktree, where Codex performs the git operations itself to carry changes over safely. The mental model: a control panel, a fan of tasks, each in its own sandbox.

Roughly: Claude Code is tuned for depth on one task, Codex for breadth across many.

## Context and memory

**Claude Code** keeps project context in `CLAUDE.md`, an instruction file loaded into every session. The hierarchy: `~/.claude/CLAUDE.md` (global rules) → `/project/CLAUDE.md` (project) → `/project/src/CLAUDE.md` (subfolder). The files don't override each other: everything from the root down to the working directory is concatenated into context at startup, and a subfolder's CLAUDE.md loads when Claude works with files in that folder. Details are in the [CLAUDE.md guide](https://futurecraft.pro/blog/claude-md-guide/). On top of that, auto memory accumulates between sessions. Subagents get isolated context, so they don't drag in everything.

```markdown
# CLAUDE.md
## Commands
npm run build      # Production build
npm run test       # Vitest

## Architecture
- src/lib/ - shared utilities
- Error handling: neverthrow Result<T, E>
```

**Codex** keeps context in `AGENTS.md`, its equivalent of the project file. It also builds a chain: the global file, then one file per directory from the project root down to the current one, concatenated in that order. How to share one file between tools is covered in the [AGENTS.md guide](https://futurecraft.pro/blog/agents-md-guide/). On top sit Memories: context carried from earlier chats into later ones, stored locally in the Codex home directory, off by default, and controlled per chat with `/memories`.

And here's the caveat that applies to both and matters most: **memory ≠ policy**. Dynamic memory (Memories in Codex, auto memory in Claude Code) is convenient. As a source of rules it's unreliable. It goes stale, it gets ignored, it can lock in a random mistake as "a project pattern". Mandatory rules stay in the repo as an explicit file: security standards, prohibitions, and invariants, all in `CLAUDE.md` or `AGENTS.md`, under version control and code review. Not "the agent remembered it at some point" but "here's the file, here's the diff, here's who changed it".

## MCP and extensibility

MCP (Model Context Protocol) is how the agent reaches the outside world: GitHub, databases, monitoring, Notion, Slack, analytics.

**Claude Code** has one of the most mature MCP implementations on the market. It supports four transports: HTTP (the recommended option for remote servers), stdio, WebSocket, and SSE, which is deprecated. OAuth 2.0 works with HTTP servers; WebSocket supports neither OAuth nor the `claude mcp add --transport` flag. After connecting, Claude Code discovers the server's tools, prompts, and resources. On top of that: skills (slash commands built from markdown files), plugins, hooks (scripts on lifecycle events: before and after a tool call, session start and end), and the Agent SDK for building custom agents on top of the engine.

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    }
  }
}
```

**Codex** does MCP too: stdio and Streamable HTTP, with OAuth for HTTP servers; configuration lives in `~/.codex/config.toml` (or `.codex/config.toml` in trusted projects) and is shared by the app, CLI, and IDE extension. It has plugins (which can bundle MCP servers) and Skills. The docs also describe Record & Replay (showing a workflow once and turning it into a reusable skill) and Computer Use (the agent works with desktop apps, not just code).

On the number of supported MCP transports, Claude Code is ahead; Codex documents Record & Replay and Computer Use as its own extras.

## Sandbox, approvals, and security

This is the most important part, and the one most often ignored.

When an agent runs commands on your machine on its own, the question "how smart is the model" is secondary. The primary one is "what can it physically do, and where will it get stopped". Sandbox and approvals matter more than model IQ. A dumb agent with `rm -rf` rights is more dangerous than a smart agent in a read-only sandbox.

**Claude Code** has permission modes and, on top of them, allow / ask / deny rules at the tool level. The modes: `default` (reads only, everything else asks), `acceptEdits`, `plan`, `auto` (a separate classifier model reviews each action), `dontAsk` (anything not pre-approved is denied, for CI), and `bypassPermissions` (no prompts, for isolated containers and VMs only). Deny rules block in every mode. The Bash sandbox limits the paths and network hosts commands can reach: sandboxed commands get no network access by default, and it runs on macOS, Linux, and WSL2. Hooks and permissions in settings are the first line of defense.

**Codex** builds a more compact formal taxonomy. Sandbox modes: `read-only`, `workspace-write` (edits inside the workspace, network off by default), `danger-full-access` (no sandbox restrictions, and the name speaks for itself). On top of that, approval policies: `on-request` (the default for interactive use), `never` (no prompts), and `granular` (selected prompt categories stay interactive, the rest are auto-rejected); `untrusted` is retired. In a version-controlled folder Codex starts in the Auto preset (`workspace-write` plus `on-request`), in a folder without version control in `read-only`. There's also auto-review (`approvals_reviewer = "auto_review"`), where a reviewer agent handles eligible approval requests, and the `--yolo` flag, which removes both sandbox and approvals. There's a native Windows sandbox. Cloud tasks get their own workspace, and secrets and network destinations are configured in the environment settings.

Both systems solve the same problem: limiting the blast radius. Codex has the more compact formal taxonomy, Claude Code is more flexible at the level of individual tools and modes. The takeaway is the same: before you admire how the agent writes code, configure what it's allowed to delete.

## Cloud and remote

Where the code actually runs gives you three different risk profiles.

**Claude Code** bets on Remote Control: web and the mobile app drive a local session on your machine. Code runs locally, with all your MCP servers, skills, and configs, but you can send commands from your phone on the subway. Plus Claude Code on the web (claude.ai/code) and cloud sessions on Anthropic-managed infrastructure that keep running with your computer off. Gravity pulls toward local: even remote control pokes your Mac underneath.

**Codex** bets on distribution. The ChatGPT mobile app drives a connected computer (a Mac or Windows PC with the desktop app; Codex shows up in the app as Codex, older versions label it Remote). There are SSH hosts for remote machines, where commands and file reads and writes run on the remote host. There are cloud tasks in OpenAI's cloud. Three different execution locations, three different risk profiles, and switching between them is a normal scenario.

The practical takeaway: always know where the agent is running right now. Local execution carries the highest risk (access to your files and secrets), which is why sandbox and approvals matter. A cloud environment is more isolated, but you have to pass credentials into it carefully. SSH is its own story about permissions on the remote host.

## Code review

Both have a separate product layer for this, and that's no accident. The more code the agent writes, the heavier the review load. Both platforms answer with built-in review.

**Claude Code** gives you managed Code Review for Team and Enterprise plans on GitHub repositories: several agents read each change alongside the surrounding code, a verification step filters out false positives, and findings land as inline comments ranked by severity. By default it focuses on correctness. A review never approves or blocks the PR, and you can also trigger it with an `@claude review` comment. Separately, the `/code-review` command reviews your branch locally on any plan.

**Codex** gives you a review panel in the desktop app (staged and unstaged changes, a commit, a branch, inline comments), local review through `/review` in the CLI, `@codex review` on a GitHub pull request, and Codex Security, a separate focus on finding vulnerabilities. Reviewing a PR in chat doesn't post comments, approve, or merge it until you use Submit review.

This isn't cosmetic. When the agent generates a diff across 30 files, the bottleneck is checking and merging it, not writing the code. Built-in review is an attempt to widen exactly that bottleneck.

## CI/CD and automation

**Claude Code** integrates with GitHub Actions (`anthropics/claude-code-action`) and GitLab CI/CD, responds to `@claude` in a PR or issue, runs non-interactively with `claude -p` for scripts, and hooks into Slack and cloud scheduled tasks (formerly routines). Typical scenarios: auto-review on every PR, changelog generation, quality monitoring in CI, auto-fixing linter errors.

```bash
claude -p --model sonnet --output-format json \
  "Review this PR for security issues and performance regressions.
   Output structured JSON with severity levels."
```

**Codex** gives you scheduled tasks right in the app (on a schedule or from supported app events), non-interactive mode (`codex exec`) for pipelines, the Codex SDK for embedding into your own systems, and an official GitHub Action (`openai/codex-action@v1`; on Windows runners it needs `safety-strategy: unsafe`).

Both platforms can run without a human at the wheel. The emphasis differs: Claude Code leans on CLI scripts, the GitHub Action, and Slack, Codex on scheduled tasks inside the app and `codex exec`.

## Worktrees and parallelism

**Claude Code** does parallelism through git worktrees: the `--worktree` (`-w`) flag and a Worktree toggle in the desktop app start a session on an isolated copy of the repository, plus background agents and Agent Teams. A subagent with `isolation: worktree` edits files in its own worktree without conflicts.

**Codex** makes worktrees first-class citizens right in the app. A worktree is a second copy (a "checkout") of the repository: its own files, shared `.git` metadata. Several independent tasks in one project, without getting in each other's way. By default Codex keeps the 15 most recent managed worktrees. Plus Handoff, a safe transfer of work between Local and Worktree through git operations under the hood.

And here's the warning people love to forget. Parallelism is not a free productivity multiplier. Five agents in five worktrees generate five branches that someone has to review, merge, and run through CI. Throughput shifts from writing code to review and merge. If your CI and review process aren't ready for that, parallel agents will create a traffic jam instead of a speedup.

## Pricing

Comparing subscription prices head-on is a mistake. The monetization models differ, and "$20 versus $20" tells you nothing.

**Claude Code** sells as subscriptions plus API:

| Plan | Price | What's included |
|---|---|---|
| Free | $0 | no Claude Code |
| Pro | $20/mo ($17/mo billed annually) | Claude Code and Opus; Fable through usage credits |
| Max | $100/mo | 5x Pro usage; Fable up to half of the weekly limit |
| Ultra | $200/mo | 10x Pro usage weekly; no 5-hour limit for verified accounts |
| Team | Standard $20/seat/mo billed annually ($25 monthly); Premium $100/seat/mo ($125 monthly), 5x Standard usage | Claude Code included; Team plan is for 2 to 150 seats |
| Enterprise | $20/seat/mo billed annually, 20-seat minimum, usage billed at API rates | Claude Code and Fable included |
| API | Pay-as-you-go | Opus 5.5: $4 / $20 per 1M tokens (input / output); Sonnet 5.5: $2 / $10; Haiku 5.5: from $0.10 / $0.50; Fable 5.1: $10 / $50 |

Pro and Max have a five-hour session limit plus a weekly limit, and Max and Ultra add a separate weekly limit for Fable. Claude Code, the IDE extensions, and the Claude apps share the same limits.

**Codex** is bundled into ChatGPT plans:

| Plan | Price | What's included |
|---|---|---|
| Free | $0 | GPT-6 Luna in the desktop app, subject to rollout |
| Go | $8/mo | GPT-6 Luna in the desktop app, subject to rollout |
| Plus | $20/mo | GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol, GPT-6 Luna; five-hour limits; credits can be bought |
| Pro | from $100/mo (tiers at $100, $200, and $500) | the same models; no five-hour limit; Ultrafast mode on the $500 tier |
| Business | $20/user/mo billed annually ($25 monthly), 2+ users | the same five-hour limits as Plus; credits can be bought |
| Enterprise / Edu | contact sales | flexible-pricing plans have no fixed rate limits and scale with credits |

There's also an API key option: it bills at API pricing.

OpenAI publishes estimates of local messages per five hours on Plus: 15 to 160 for GPT-6.1 Sol, 35 to 285 for GPT-6.1 Terra, 350 to 3,000 for GPT-6 Luna; cloud tasks may use more. Usage can also be counted in credits per 1M tokens (for GPT-6.1 Sol at standard speed: 50 for input, 250 for output); for purchased credits, Fast mode costs 2x the standard rate and Ultrafast 6x. Predicting a monthly spend in advance is hard: it depends on the model, the number of parallel instances, and scheduled tasks. Large codebases and a fan of tasks eat the limit faster.

And the main point. The right axis for comparison is **TCO per merged PR**, not the price of entry. The math: how many tokens a task consumes, plus how many person-hours go into reviewing the generated diff, plus how many CI minutes the run takes. A fan of parallel agents produces more diffs per subscription, but if every diff needs a half-hour review, the cheap subscription turns into an expensive merge. One deep session produces fewer branches and less review load. Where your optimum sits depends on your bottleneck: tokens, review, or CI.

## Side-by-side comparison

| Axis | Claude Code | Codex |
|---|---|---|
| **Vendor** | Anthropic | OpenAI |
| **Center of gravity** | terminal, one machine | desktop app as command center |
| **Surfaces** | terminal, IDE, desktop, web, Remote Control, Slack, CI; macOS / Linux / Windows | app, CLI, IDE, cloud/web, mobile, SSH; macOS / Windows / Linux |
| **Models** | Opus 5.5 by default (+ Sonnet 5.5, Haiku 5.5, Fable 5.1 on request) | GPT-6 lineup (Astra, 6.1 Sol, 6.1 Terra, Luna) |
| **Reasoning control** | model choice by tier, effort setting | reasoning effort (Light to Max, Ultra) + model choice |
| **Agent model** | gather→act→verify loop, plan mode, subagents, Agent Teams | /goal, cloud tasks, subagents, Handoff |
| **Project context** | CLAUDE.md (hierarchy) + auto memory (can also read AGENTS.md) | AGENTS.md + Memories (off by default) |
| **MCP transports** | HTTP, stdio, WebSocket, SSE (deprecated); OAuth on HTTP | stdio, Streamable HTTP; OAuth on HTTP |
| **Extensibility** | skills, plugins, hooks, Agent SDK | plugins, Skills, Record & Replay, Computer Use |
| **Sandbox / access** | permission modes (default, acceptEdits, plan, auto, dontAsk, bypassPermissions) + allow/ask/deny rules, Bash sandbox with network isolation | read-only / workspace-write / danger-full-access |
| **Approval policies** | per-tool ask/allow/deny | on-request / never / granular (untrusted retired), auto-review |
| **Cloud / remote** | Remote Control (web/mobile → local), cloud sessions on the web | ChatGPT mobile → connected computer, SSH, cloud tasks |
| **Code review** | managed Code Review (Team/Enterprise, GitHub), @claude review, local /code-review | review panel in app, /review in CLI, @codex review on GitHub, Codex Security |
| **CI/CD** | GitHub Actions / GitLab CI/CD, @claude in PRs, claude -p, Slack, cloud scheduled tasks | scheduled tasks in app, codex exec, Codex SDK, GitHub Action |
| **Worktrees** | --worktree flag, desktop toggle, isolation: worktree for subagents | first-class in app, Handoff Local↔Worktree |
| **Windows** | native + WSL2 | desktop app native (PowerShell + Windows sandbox), WSL2 optional |
| **Billing model** | Pro/Max/Ultra subscriptions + API/Console | bundled into ChatGPT plans, credits |

## Who each one is for

### Claude Code

Pick it if:

- you live in the terminal and treat that as a feature, not a bug;
- your work is complex refactoring, debugging, and architectural changes with deep context on a single task;
- you need a mature MCP ecosystem: many transports, OAuth, hooks, custom servers;
- granular permission modes and a clear sandbox with network isolation matter to you;
- you want managed multi-agent code review with inline comments in GitHub;
- CI automation and chat-ops through Slack are part of your workflow.

### Codex

Pick it if:

- you want a command center for a fan of parallel tasks rather than one deep session;
- worktrees and cloud tasks are daily tools, and you're ready for the review and merge load;
- you're on Windows and prefer a desktop app that runs natively (PowerShell plus the Windows sandbox, WSL2 optional);
- driving the agent from your phone through ChatGPT while away from the machine is convenient for you;
- your work involves SSH hosts and distributed execution;
- your team already sits in the ChatGPT / OpenAI ecosystem, and single billing and one shared pool are a plus.

## Verdict

There's no "best". There's a fit for how your work is set up and where your bottleneck is.

**Claude Code** is about depth. One machine, one session (or managed subagents underneath it), wide MCP transport coverage, fine-grained permissions, hooks, managed review (Team and Enterprise). If the task is complex, the context is deep, and you value control over what the agent can do to your machine, this is your tool.

**Codex** is about breadth. A command center, first-class worktrees, Handoff, `/goal`, cloud tasks, a Windows app that runs natively (WSL2 as an option, not a requirement), mobile control of a connected computer through ChatGPT. If you run many tasks in parallel, are ready for the merge load, and live in the OpenAI ecosystem, it will pay off.

But remember three things that matter more than the brand choice:

1. **Where the code runs**, local, remote, or a cloud container, sets the risk profile more than which model is under the hood.
2. **Limit the blast radius first.** Before praising the agent for code quality, check exactly what it's allowed to do to your machine.
3. **Parallelism shifts the bottleneck** from writing to review, merge, and CI. Count TCO per merged PR, not the subscription price.

Concrete recommendations:

1. **Deep refactoring and debugging, life in the terminal** → Claude Code (Max as the workhorse).
2. **A fan of parallel tasks, worktrees, cloud** → Codex.
3. **Windows, with priority on a native desktop experience without WSL2** → Codex (its app runs natively with a Windows sandbox; Claude Code also runs natively, but through CLI/PowerShell).
4. **Mature MCP / hooks / permissions / CI automation** → Claude Code.
5. **The team is already in ChatGPT / OpenAI and needs a single pool** → Codex.
6. **Driving the agent from a phone against a local machine** → Claude Code (Remote Control) or Codex (the ChatGPT mobile app with a connected computer), depending on where the code runs.

Both platforms are moving at a brutal pace: model numbers go stale in a month, features ship weekly. But the fundamental difference, terminal-first depth versus multi-surface breadth, will stay. So will the main rule: don't give an agent wider access to your terminal and files than you'd hand an unfamiliar junior with no supervision.
