AI

Codex vs Claude Code in 2026: two coding agents compared, and which to pick

Codex or Claude Code? We compared the two coding agents on install, sandboxing, subagents, hooks, GitHub review, cloud modes, team controls and price, and say which one we'd pick. Checked 28 September 2026.

Cheapest startCodex on ChatGPT Plus
Most controlClaude Code
SandboxingBoth, OS-level
Nora Whitfield
Written by: Editor, AI and software
James Carver
Reviewed by: Editor, hardware and consumer tech
Updated: 19 min read
A laptop showing two terminal windows, one coral and one green, divided by a thin frosted-glass pane rising from the keyboard.

Updated 30 September 2026: We added OpenAI’s 29 September changes: GPT-6.1 Sol in Codex, Codex Cloud, the refreshed Codex CLI with voice and an /agents view, Code Review in the desktop app, the new Pro 500 plan with Ultrafast, and OpenAI’s first published comparison against Opus 5.5. We also added Anthropic’s Claude Sonnet 5.5, released on 28 September, which replaces Sonnet 5. Our pick is unchanged.

If you’re picking a coding agent this autumn, the choice usually comes down to OpenAI’s Codex or Anthropic’s Claude Code. Both will read a repository, edit files, run commands and open pull requests, and both come as a terminal tool, an editor extension, a desktop app and a cloud service. Below we cover what each one is as of September 2026, how you install and steer it, how it keeps an autonomous agent from wrecking your machine and what it costs, and then say which one we’d pick. Docs and prices were checked on 28 September 2026.

The short version
  • They’re closer than the marketing suggests. Both have subagents, hooks, MCP, a sandbox built on macOS Seatbelt and Linux bubblewrap, GitHub code review and a cloud mode. The differences are in defaults, plans and admin tooling.
  • Codex is cheaper to start with. OpenAI puts a limited Codex into the Free and $8 Go plans and, since 29 September, lists the refreshed CLI and desktop Code Review for all plans. Plus at $20 adds the IDE extension, Codex Cloud, GitHub review and GPT-6.1 Sol. Claude Code needs a paid plan, either Pro at $20 a month or Max from $100.
  • Claude Code gives you more knobs. Six permission modes, a classifier-driven auto mode, twenty-plus hook events, a scriptable CLI and an Agent SDK. Codex keeps it simpler with one sandbox mode and one approval policy.
  • Cost per developer lands in the same band. Anthropic publishes an average of about $13 per active day on the API. OpenAI publishes message-count ranges per five-hour window instead, and both will sell you credits when you run out.

The two products in September 2026

Codex is OpenAI’s name for the coding agent inside ChatGPT. Its docs have moved to learn.chatgpt.com (developers.openai.com/codex now redirects there), which tells you how far it has been folded into the ChatGPT product. You get it in the ChatGPT desktop app on macOS, Windows and Linux, in the Codex CLI, in an IDE extension for VS Code, Cursor and Windsurf, as native integrations for Xcode and JetBrains, and as Codex cloud. When we checked on 28 September the current CLI was 0.157.1, released on 26 September 2026, and the default model was GPT-6 Sol at medium reasoning. GPT-6 Sol and GPT-6 Luna, which sit below the flagship GPT-6 Astra, arrived in late September 2026; CLI 0.157.0 added them on 25 September. GPT-5.5 retires from Codex on 14 October 2026. On 29 September OpenAI added GPT-6.1 Sol, an upgrade to GPT-6 Sol that it says “nearly matches GPT-6 Astra’s intelligence on agentic coding, computer use, and professional work at one-fifth of Astra’s standard input and output token prices”. It is available in Codex and ChatGPT Work for Plus, Pro, Business, Enterprise and Edu users, with Pro getting it first, but it isn’t in ChatGPT’s Chat yet. The same day OpenAI announced a refreshed Codex CLI with voice and an /agents view for all plans.

Claude Code is Anthropic’s agent, and Anthropic has kept it as a product in its own right, with its own docs at code.claude.com. It runs as a terminal CLI on macOS, Linux and Windows, as a VS Code extension that also installs into Cursor, as a JetBrains plugin, as a desktop app, on the web at claude.ai/code, in the Claude mobile apps, in Slack and in GitHub Actions. The default model on every paid plan and on the API is Claude Opus 5.5, which shipped on 22 September 2026 at $4 and $20 per million tokens. Anthropic’s newest Sonnet, Claude Sonnet 5.5, followed on 28 September at $2 and $10 and runs at medium effort by default in Claude Code. Anthropic claims it scores 70.6 percent on Terminal-Bench 4.0 against 66.4 percent for Opus 5.5, but says Opus 5.5 “remains clearly stronger at complex, open-ended work”. All of those surfaces run the same engine, so a repository’s CLAUDE.md, settings and MCP servers carry over between them.

AgentDefault modelCheapest plan with itSurfacesSandbox
OpenAI logoOpenAI CodexCLI 0.157.1 · 26 Sep 2026GPT-6 Sol (medium)
GPT-6.1 Sol added 29 Sep
Free / Go $8 (Luna only, desktop app)Desktop app, CLI, VS Code, Cursor, Windsurf, Xcode, JetBrains, cloud, GitHub, SlackSeatbelt, bubblewrap, native Windows
Anthropic logoClaude Codecode.claude.com · Opus 5.5 defaultClaude Opus 5.5Pro $20CLI, VS Code, Cursor, JetBrains, desktop app, web, mobile, Slack, GitHub Actions, ChromeSeatbelt, bubblewrap (WSL2 only on Windows)
OpenAI logoCodex with an API keypay per tokenAny API modelUsage-basedCLI, SDK, IDE extension only; no cloud, no GitHub reviewSame local sandbox
Anthropic logoClaude Code on the APIConsole, Bedrock, Google Cloud, FoundryOpus 5.5Usage-basedAll local surfaces; cloud sessions need a claude.ai accountSame local sandbox

Installing and running a first task

Both install with a single command. For Codex CLI on macOS or Linux it’s curl -fsSL https://chatgpt.com/codex/install.sh | sh, or npm install -g @openai/codex; there’s a Homebrew option and a Windows build too. Run codex inside a project, pick “Sign in with ChatGPT” and describe a task. From there /init writes an AGENTS.md instructions file, /permissions sets boundaries, /model changes the model and reasoning effort, and /review looks over your changes. Reasoning effort goes from Low through Medium, High, Extra high and Max up to Ultra, which also delegates to subagents on its own.

Claude Code’s native installer is curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL, irm https://claude.ai/install.ps1 | iex in PowerShell, or brew install --cask claude-code and winget install Anthropic.ClaudeCode; there are apt, dnf and apk packages as well. Native installs keep themselves updated in the background. Run claude in a project and log in. Its instructions file is CLAUDE.md, though it will happily read an AGENTS.md that another agent left behind. The effort dial runs low, medium, high, xhigh and max, and Opus 5.5 defaults to medium.

Claude Code welcome screen in a dark terminal window on an orange background, showing a short code snippet and an empty prompt
Claude Code’s terminal, from Anthropic’s product page. A session started here can carry on in the desktop app, on the web or on your phone. Source: Anthropic

Sandboxing and permissions

The two companies have ended up with almost the same architecture. Both lean on the operating system to fence in shell commands, Seatbelt on macOS and bubblewrap on Linux and WSL2. Codex also has a native Windows sandbox when you run it from PowerShell; Claude Code’s sandbox doesn’t support native Windows, so on Windows you run it inside WSL2. In both, the sandbox covers anything the agent spawns, so git, package managers and test runners inherit the same limits.

Codex describes its controls as two layers. The sandbox mode is what the agent can physically do: read-only, workspace-write (the default) or danger-full-access. The approval policy is when it has to stop and ask: on-request (the default) or never; the old untrusted policy has been retired. Network access is off by default and writes stay inside the workspace, so the everyday preset amounts to “read files, edit in the workspace, run commands, and ask before touching the internet or anything outside”. A newer option, approvals_reviewer = "auto_review", hands eligible approval prompts to a reviewer agent instead of to you. All of this lives in ~/.codex/config.toml or a project’s .codex/config.toml.

Claude Code splits the same ideas into permission modes and the Bash sandbox. There are six modes: default (shown as Manual in the UI; it asks before edits and commands), acceptEdits, plan, auto, dontAsk for locked-down CI, and bypassPermissions for containers. Shift+Tab cycles through them. Since version 2.1.283 a terminal or VS Code session starts in auto, where a separate classifier model looks at each action and blocks anything that goes beyond what you asked for, or looks like it was steered by hostile content the agent read. The /sandbox panel is separate from all of this. It pre-allows no network domains, prompts the first time a command needs one, and can be forced on through managed settings so developers can’t switch it off.

Both have a “trust me” switch Codex’s is --dangerously-bypass-approvals-and-sandbox; Claude Code’s is --dangerously-skip-permissions. Both vendors’ docs say the same thing about them: use them only inside a container or VM you’re prepared to lose. In both tools the comfortable middle ground is workspace writes with network prompts, and that’s where we’d stay for the first week.

Subagents, hooks, MCP and GitHub

On paper the feature lists match. Both run subagents. Codex switches them on by default in current releases, gives you /agent to inspect threads and, in the CLI refreshed on 29 September, an /agents view, and delegates on its own in Ultra mode; Claude Code defines them as Markdown files with YAML frontmatter in .claude/agents/, ships built-in Explore and Plan agents, and allows up to 20 concurrent subagents by default, nested three deep. Both have hooks. Codex reads hooks.json or a [hooks] table and fires on PreToolUse, PostToolUse, PermissionRequest, UserPromptSubmit, Stop, SessionStart and a handful more; Claude Code configures hooks in settings.json, its reference lists more than twenty events, and it can run prompt-based and agent-based hooks that ask a model to judge instead of running a script. Both speak MCP: codex mcp adds local or remote servers, while claude mcp add --transport http handles HTTP servers with OAuth and holds back tool definitions until they’re needed so the context stays small.

SubagentsBoth Codex: on by default, /agent and an /agents view · Claude Code: up to 20 concurrent, 3 levels deep
HooksBoth Codex: 12 events in hooks.json · Claude Code: 20+ events, plus prompt and agent hooks
Instructions fileAGENTS.md vs CLAUDE.md Claude Code also reads AGENTS.md
Cloud isolationBoth Codex: OpenAI containers, agent offline by default · Claude: Anthropic VMs, limited network
GitHub reviewBoth @codex on Plus and up · @claude review on Team and Enterprise, $15-25 per review
ScriptingBoth codex exec and a Codex SDK · claude -p, pipes and an Agent SDK

On GitHub, the two differ on who gets what. Codex code review comes with the Plus plan. You switch it on per repository in Codex settings, then mention @codex in a pull request to ask a question or kick off a task; a Security Review is in research preview. Since 29 September OpenAI also offers Code Review in the ChatGPT desktop app on all plans, and Codex Security Cloud on Pro, Business, Enterprise and Edu. Claude Code has two routes. The self-hosted one is /install-github-app, which sets up the claude-code-action@v1 workflow so that @claude mentions in issues and PRs run on your own Actions minutes, authenticated with an API key or with a subscription token from claude setup-token. The managed one, Code Review, runs a fleet of agents on Anthropic’s infrastructure, posts severity-tagged inline comments, takes about 20 minutes on average and costs $15 to $25 per review through usage credits. It’s limited to Team and Enterprise plans and is still a research preview. For GitHub’s own assistant, see our guide to GitHub Copilot.

The cloud modes look alike. Codex cloud checks your repository out into an OpenAI-managed container, runs a setup script with internet access, then runs the agent offline unless you’ve enabled internet for that environment. Secrets are stripped before the agent phase and containers are cached for up to 12 hours. OpenAI’s 29 September announcement lists Codex Cloud for Plus, Pro, Business, Healthcare, Education and Enterprise plans. Tasks can start from the web, GitHub, GitLab (in beta), Linear or Slack. Claude Code’s cloud sessions run in isolated Anthropic-managed VMs with network access limited by default, git credentials kept outside the sandbox and no separate compute charge. You start one from the browser, the mobile app, the desktop app or claude --cloud, and pull it back into your terminal with claude --teleport. Cloud sessions come with Pro, Max and Team, and with Enterprise premium seats.

Blue gradient card reading Codex CLI with the ChatGPT wordmark and OpenAI logo
OpenAI’s Codex docs now live under the ChatGPT brand at learn.chatgpt.com. Source: OpenAI

Plans and prices

Codex rides on the ChatGPT plans. Free ($0) and Go ($8 a month) get GPT-6 Luna in the desktop app, subject to rollout. Plus at $20 a month is the real entry point: Codex on the web, in the CLI, in the IDE extension and on iOS, GPT-6 Sol and Luna, GPT-6.1 Sol as it rolls out, plus the cloud extras such as automatic code review and Slack. Pro now comes in three monthly tiers, with no annual billing: Pro 100 at $100, Pro 200 at $200 and, since 29 September, Pro 500 at $500, sold through ChatGPT on the web at launch. When we checked on 28 September OpenAI quoted 5x or 20x the Plus limits for Pro; Pro 500 is, in OpenAI’s words, “our highest usage allowance at 25 times the ChatGPT Plus allowance”. Pro 200 is open to new subscribers again, but new Pro 200 subscriptions get a lower allowance than before, and existing eligible subscribers keep the old one until 29 October 2026. Of the three, only Pro 500 includes Ultrafast, OpenAI’s premium speed tier, which generates tokens up to 8x faster in Codex, at 300 tokens a second. It serves GPT-6 Astra Ultrafast in Codex and ChatGPT Work on Pro 500 and Enterprise, and OpenAI says a GPT-6.1 Sol Ultrafast is due in the next few days. Business is $20 per user per month billed annually for two or more users ($25 monthly) and adds SAML SSO, MFA and larger cloud VMs. Enterprise and Edu are priced by sales and add SCIM, role-based access, audit logs and data residency. With an API key you get the CLI, SDK and IDE extension at API rates and none of the cloud features.

Claude Code comes with every paid Claude plan but isn’t included in Free. Pro is $20 a month, or $17 on an annual plan. Max is “from $100 a month” with a choice of 5x or 20x Pro’s usage. Team seats are $20 (standard) or $100 (premium, with 5x the usage) per month billed annually, or $25 and $125 monthly, and every Team seat includes Claude Code. Enterprise is $20 per seat per month plus usage at API rates. Usage on all of these is measured in a rolling five-hour window and a weekly window, shared with Claude chat, and you can switch on usage credits to keep working once you hit the limit.

Codex, Plus $20OpenAI’s estimate: 15-150 local GPT-6 Sol messages or 350-3,000 Luna messages per five hours; weekly limits may also apply
Codex, Pro tiersPro 100 $100, Pro 200 $200, Pro 500 $500 a month · 5x / 20x Plus gave 70-700 / 300-3,000 Sol messages per five hours on 28 September; Pro 500 is 25x Plus and adds Ultrafast
Claude Code on the APIAbout $13 per developer per active day and $150-250 per month across enterprise deployments; under $30 a day for 90 % of users
Model list pricesGPT-6 Sol and GPT-6.1 Sol $2 / $10 per 1M tokens, GPT-6 Luna $0.10 / $0.50 · Opus 5.5 $4 / $20, Sonnet 5.5 $2 / $10

Two caveats before you compare those numbers. OpenAI’s message ranges are estimates rather than fixed limits, and cloud chats on ChatGPT plans currently use GPT-5.6 Sol and can use up more of your allowance than local messages. Anthropic’s dollar figures are for API billing; on a subscription the same work drains a usage bar instead of producing a bill, and Anthropic’s own advice is to run a small pilot and check /usage before rolling out to a team. Both vendors sell top-up credits. OpenAI quotes GPT-6 Sol at 50 credits per million input tokens and 250 per million output, and Claude Code’s Team and Enterprise admins can cap credit spend per organisation, group or person. Credits don’t buy speed on OpenAI’s side, though: topping up on Pro 100 or Pro 200 doesn’t unlock Ultrafast.

Team and enterprise controls

Both companies now sell to platform teams as much as to individual developers. Claude Code’s answer is managed settings. An admin can pin permission modes, force the sandbox on and turn a missing bubblewrap into a hard failure rather than a warning, disable auto mode, and enter contracted per-token rates so /usage matches the invoice. Spend is visible per user through the admin console, an Enterprise Analytics API and OpenTelemetry export, and all of it runs on Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry if your data has to stay in your own cloud. Codex’s controls come with the ChatGPT Business and Enterprise workspaces: SAML SSO and MFA on Business; SCIM, enterprise key management, RBAC, audit logs, a Compliance API and data retention and residency on Enterprise, along with workspace-level model availability and managed configuration for the agent. Codex CLI 0.157.0 also picked up Amazon Bedrock support for the GPT-6 models.

+Reasons to pick Codex

  • You already pay for ChatGPT Plus, so the CLI, IDE extension, cloud and GitHub review cost nothing extra
  • You want a free or $8 way to try an agent before you commit
  • You live in Xcode or JetBrains and want a first-party integration
  • You’re on Windows and want native sandboxing without WSL2
  • You prefer a simpler setup: one sandbox mode, one approval policy

+Reasons to pick Claude Code

  • You want fine control: six permission modes, a classifier auto mode, 20+ hook events
  • You script agents: claude -p, pipes, GitHub Actions on your own runners, an Agent SDK
  • Your organisation needs managed settings, per-user spend reporting, or hosting on Bedrock, Google Cloud or Foundry
  • You move work between phone, web, desktop and terminal within one session
  • Opus 5.5 is the default, with Sonnet 5.5 and Haiku a /model away

Verdict

Our take, 30 September 2026

If you already have ChatGPT Plus, install Codex first. It costs nothing extra, the default preset is sensible, and cloud and GitHub review come along for free. If you’re choosing a subscription specifically to run a coding agent, or you’re the person who has to roll one out to a team, we’d go with Claude Code. Its permission system, hooks, scripting surface and admin controls go deeper, and every one of its surfaces shares the same configuration.

The complication is that the two are converging month by month. Codex picked up subagents, hooks, an auto-reviewer for approvals and Bedrock support this year; Claude Code picked up a classifier-based auto mode and a managed code reviewer. Choose on how well the plan and workflow fit you, rather than on a feature the other side will probably have copied by the next release. We haven’t run a head-to-head coding benchmark for this guide. The only cross-vendor figure so far is OpenAI’s own claim that GPT-6.1 Sol scores 2.2 points above Opus 5.5 at medium effort on AutomationBench, at roughly a third of the cost, and that compares models rather than the two agents.

Frequently asked questions

Is Codex or Claude Code better for coding?

There’s no clear winner on published evidence. The one cross-vendor number is OpenAI’s own claim that GPT-6.1 Sol, now in Codex, scores 2.2 points above Opus 5.5, Claude Code’s default, at medium effort on AutomationBench, at roughly a third of the cost. It compares models rather than the two agents, and we haven’t run our own tests. Codex is the better value if you already pay for ChatGPT Plus. Claude Code has the deeper permission, hook and admin systems, which makes it the stronger pick for teams and for scripted, unattended work.

Can I use Codex for free?

Partly. OpenAI’s Free and $8 Go plans include Codex with GPT-6 Luna in the ChatGPT desktop app, subject to rollout, and since 29 September OpenAI lists the refreshed Codex CLI and Code Review in the desktop app for all plans. The IDE extension, Codex Cloud and GitHub code review start at Plus, $20 a month, and GPT-6.1 Sol isn’t offered on Free or Go. Claude Code has no free tier at all; you need Pro at $20 a month or higher.

Which is safer to run unattended?

They’re about equal. Both sandbox shell commands with macOS Seatbelt and Linux bubblewrap and both block network access by default. Codex adds a native Windows sandbox; Claude Code adds a classifier that checks each action in auto mode and lets admins force the sandbox on. For fully unattended runs both vendors give the same advice: use a container or VM.

Do they work with my existing AGENTS.md or CLAUDE.md?

Yes, with one asymmetry. Codex reads AGENTS.md, and its /init command creates one. Claude Code reads CLAUDE.md and can also read an AGENTS.md on its own or alongside CLAUDE.md, so one repository can serve both agents with a shared file plus a short Claude-specific one.

What does each cost per month for a heavy user?

From $100 a month on either side. Codex’s heavy-use plans are ChatGPT Pro 100, Pro 200 and, since 29 September, Pro 500 at $500 a month with 25 times the Plus allowance and Ultrafast. Claude Code’s is Max (5x or 20x Pro usage), so both ChatGPT Pro and Claude Max start at $100. On the API, Anthropic reports an average of $150 to $250 per developer per month across enterprise deployments. OpenAI publishes message ranges and credit rates rather than a dollar average, so the only fair comparison is to run a pilot.

Sources and method

All prices, plan contents, usage estimates, version numbers, model names and configuration details were taken from OpenAI’s and Anthropic’s own documentation and pricing pages on 28 September 2026; OpenAI’s pages were rechecked on 30 September 2026 after its 29 September announcements, and Anthropic’s model pages were rechecked on 30 September 2026 after the Claude Sonnet 5.5 release. Where a vendor gives a range or an average, we quote it as the vendor’s claim. We didn’t run a hands-on benchmark of the two agents for this guide. OpenAI’s Codex documentation at developers.openai.com redirects to learn.chatgpt.com; we cite the original URLs.

  1. OpenAI, Codex pricing: plan prices, per-plan message estimates, credit rates, feature availability table
  2. OpenAI, Codex CLI: install command, default model, slash commands, subagents, MCP
  3. OpenAI, Codex models: GPT-6 Astra, Sol and Luna, reasoning levels, GPT-5.5 retirement date
  4. OpenAI, Sandboxing and Agent approvals and security: sandbox modes, approval policies, OS mechanisms, network defaults
  5. OpenAI, Codex cloud, Cloud environments and Code review
  6. OpenAI, Hooks, Subagents, IDE extension and Changelog (CLI 0.157.0 and 0.157.1)
  7. OpenAI, API pricing: GPT-6 Sol, Luna and Astra token prices
  8. Anthropic, Claude Code overview: install commands, surfaces, features
  9. Anthropic, Permission modes and Sandboxing
  10. Anthropic, Subagents, Hooks, MCP and Model configuration
  11. Anthropic, GitHub Actions, Code Review and Claude Code in the cloud
  12. Anthropic, Manage costs: per-developer averages, usage windows, admin controls
  13. Claude, plans and pricing and Claude Code product page
  14. OpenAI, DevDay 2026 Recap (29 Sep 2026): Codex Cloud, refreshed CLI, desktop Code Review, Codex Security Cloud, Pro 500, Ultrafast
  15. OpenAI, Introducing GPT-6.1 Sol (29 Sep 2026): availability, API prices, benchmark claims against GPT-6 Astra and Opus 5.5
  16. OpenAI Help Center, About ChatGPT Pro tiers: Pro 100, Pro 200 and Pro 500 prices, allowance changes, Ultrafast
  17. OpenAI Help Center, ChatGPT release notes (29 Sep 2026 entry): GPT-6.1 Sol rollout order
  18. Anthropic, Introducing Claude Sonnet 5.5: release date, API price, Claude Code effort default, benchmark claims
  19. Anthropic, Models overview: current Claude models and prices
Nora Whitfield

Nora Whitfield

Nora Whitfield is Lomivu's editor for AI and software. She compares ChatGPT, Claude, Gemini, Grok and the coding tools built on them using the companies' own pricing, plan and privacy pages, names the model versions and the date she checked, and updates each comparison when a new model ships.

All articles by this author →
Add Lomivu as a preferred source on Google

Our articles will show up first in Search, Discover, and Google AI. Just check lomivu.com in the list on the Google page.