Atomic Agent mascot watering a shelf of sprouts, some thriving and some wilted, while the Claude logo sits under a glass museum dome
Comparison

Codex vs Claude Code: Features, Pricing, Limits and Model Cost per Task

Published
Reading time
12 min read

Codex vs Claude Code on 10 points: plans from $20, five-hour limits, sandboxes, local models, and one task measured in Atomic Agent at $0.33 vs $0.97 in model cost.

Codex and Claude Code are the two coding agents sold with the biggest AI subscriptions. Codex is OpenAI’s agent: an Apache-2.0 CLI plus an IDE extension, desktop app and Codex Cloud, included with ChatGPT plans. Claude Code is Anthropic’s proprietary agent for Claude models, included with Claude Pro, Max, Ultra, Team and Enterprise. Both start at $20 a month and both run in your terminal, so the real differences are in models, limits, sandboxing and what a task costs.

We build Atomic Agent, a third option covered near the end with that disclosure. Everything about Codex and Claude Code was checked on November 18, 2026, against OpenAI’s and Anthropic’s docs and pricing pages. The cost figures come from our own runs of one benchmark task in Atomic Agent, our harness, not inside Codex or Claude Code.

Quick answer: Codex or Claude Code?

Pick Codex if you already pay for ChatGPT, want an open-source CLI, need a sandbox on native Windows, or want to plug in local models through Ollama or LM Studio. Pick Claude Code if you want Claude models, already pay for Claude Pro or Max, and want Anthropic’s lifecycle hooks and auto mode. At API rates, one task we measured in Atomic Agent cost about a third as much in model cost on GPT-6.2 Sol as on Opus 5.5.

If youPickWhy
Pay for ChatGPT Plus or ProCodexCodex is included on web, CLI, IDE and iOS
Pay for Claude Pro or MaxClaude CodeThe subscription covers it; other tools cannot use it
Work on native WindowsCodexDocumented native Windows sandbox
Want local modelsCodexBuilt-in Ollama and LM Studio providers, --oss flag
Want Claude Opus or SonnetClaude CodeClaude models only, tuned for this harness
Want an auditable, forkable CLICodexApache-2.0 on GitHub

Codex vs Claude Code at a glance

The core split: Codex is an open-source CLI tied to OpenAI models but open to other providers, and Claude Code is a closed agent for Claude only. Both cost $20 at entry level and about $100 at the next tier. Codex sandboxes on all three desktop systems; Claude Code skips native Windows. Values checked November 18, 2026.

CodexClaude Code
MakerOpenAIAnthropic
LicenseApache-2.0 (CLI)Proprietary
GitHub starsAbout 136,000About 156,000 (issues and plugins repo)
ModelsIncludes GPT-6.2 Sol, GPT-6.2 Astra, GPT-6.1 Terra, GPT-6 Astra, GPT-6 Sol and GPT-6 Luna; custom providersClaude models only
Local modelsBuilt in: --oss with Ollama or LM StudioUnofficial, through Ollama’s compatible API
Entry planChatGPT Plus, $20/monthClaude Pro, $20/month or $17 annual
Next tierChatGPT Pro from $100/monthMax, $100/month
SandboxSeatbelt (macOS), bubblewrap (Linux, WSL2), native WindowsmacOS, Linux, WSL2
Approvalson-request or never, optional auto reviewerManual, plan, accept edits, auto mode with a classifier
Credential storefile, keyring, auto or ephemeralmacOS Keychain; ~/.claude/.credentials.json elsewhere
Project memory fileAGENTS.mdCLAUDE.md (can read AGENTS.md)

Features: modes, subagents, MCP, hooks and memory

Both agents now share most of the feature list: subagents, MCP servers, skills and plugins, hooks, a project memory file and a code review command. Codex adds Codex Cloud for tasks that run on OpenAI’s machines and codex exec for scripts. Claude Code goes further on permission modes and lifecycle hooks, and runs on the web at claude.ai/code.

Memory files. Codex reads AGENTS.md and writes a starter file with /init (Codex CLI docs). Claude Code reads CLAUDE.md, can fall back to a repo’s AGENTS.md, and keeps auto memory (memory docs). A repo with an AGENTS.md works in both.

Subagents, skills and hooks. Both tools support subagents, skills, plugins, MCP servers and hooks. Claude Code’s hooks cover more lifecycle events and its subagents can run in the background. Codex lists subagents and hooks in its config reference.

Review and automation. Codex has a /review command, codex exec for non-interactive runs and Codex Cloud for delegated tasks. Claude Code runs headless with -p and in GitHub Actions.

Interfaces. Codex ships a CLI, an IDE extension, a desktop app, a web app and iOS. Claude Code ships a CLI, VS Code and JetBrains extensions, a desktop app and the web.

What this means for you: features are no longer the deciding factor. Choose by model family and plan, then check that the hooks or cloud features you rely on exist in the one you pick.

Models and local models

Codex runs OpenAI models by default and treats other providers as a config option: built-in IDs for OpenAI, Ollama and LM Studio, plus any OpenAI-compatible base_url. Claude Code runs Claude models. Anthropic does not support routing it to anything else, though Ollama documents a workaround. For local models, Codex is the supported path.

Codex. On ChatGPT Plus, the Codex model list includes GPT-6.2 Sol and GPT-6.2 Astra (both released November 17, 2026), GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra, GPT-6 Sol and GPT-6 Luna (pricing). The --oss flag switches to a local model through oss_provider = "lmstudio" or "ollama", and model_providers.<id>.base_url adds any other endpoint (config reference).

Claude Code. It signs in with a Claude plan, the Claude Console or a cloud platform such as Amazon Bedrock (authentication). The LLM gateway docs say Anthropic does not support routing Claude Code to non-Claude models. Ollama’s Claude Code integration works anyway with ollama launch claude, and recommends 64k or more tokens of context. For a full walkthrough, see our guide to running Claude Code with a local LLM.

What this means for you: if you want to switch between a cloud model and a model on your own GPU without changing tools, Codex supports it out of the box. If you only want Claude, Claude Code is built for it.

Pricing: ChatGPT plans vs Claude plans

Both start at $20 a month and both have a $100 tier. Codex comes with ChatGPT Plus ($20), Pro (from $100) and Business ($20 per user annual, $25 monthly). Claude Code comes with Claude Pro ($20, or $17 on annual billing), Max ($100), Ultra ($200), Team and Enterprise. On the API, GPT-6.2 Sol costs half of Opus 5.5 per token.

Codex (learn.chatgpt.com/docs/pricing):

  • Free ($0) and Go ($8): GPT-6 Luna in the desktop app only.
  • Plus ($20 a month): Codex on web, CLI, IDE and iOS. Five-hour message limits (OpenAI calls them estimates): GPT-6.2 Astra 6-50, GPT-6.2 Sol 17-180, GPT-6 Astra 5-45, GPT-6.1 Sol 15-160, GPT-6.1 Terra 35-285, GPT-6 Sol 15-150, GPT-6 Luna 350-3,000. Weekly limits may also apply.
  • Pro (from $100 a month): $100, $200 and $500 levels, with no five-hour limit.
  • Business: $20 per user a month billed annually, $25 monthly. Enterprise through sales.
  • API, per million tokens (input / cached / output): GPT-6.2 Sol $2 / $0.10 / $10; GPT-6.2 Astra $8 / $0.40 / $40.

Claude Code (claude.com/pricing):

  • Free: no Claude Code.
  • Pro: $20 a month, or $17 a month on annual billing ($200 up front).
  • Max ($100) and Ultra ($200): Max lists 5x Pro usage and includes $100 in API credits; Ultra lists 10x Pro usage per week, no five-hour limit for verified accounts and $200 in API credits.
  • Team: standard seats $20 annual or $25 monthly, premium seats $100 annual or $125 monthly. Enterprise $20 per seat annual, 20-seat minimum, plus usage.
  • API, per million tokens (input / output): Opus 5.5 $4 / $20, Sonnet 5.5 $2 / $10, Haiku 5.5 $0.10 / $0.50.

What this means for you: at $20 the plans look equal, but only OpenAI publishes how many Codex messages you get. If you work in long sessions, compare the $100 tiers: ChatGPT Pro drops the five-hour window, Claude Max keeps it.

Sandbox, approvals and credentials

Codex runs commands inside an OS-level sandbox mode you choose and is the only one of the two with a native Windows sandbox. Claude Code starts in auto mode, where a classifier reviews actions, and offers an optional sandbox on macOS, Linux and WSL2. Both can keep credentials in the OS keychain; Claude Code does it by default on a Mac.

Codex has three sandbox modes: read-only, workspace-write and danger-full-access, enforced by Seatbelt on macOS, bubblewrap on Linux and WSL2 and a native Windows sandbox. The approval policy is on-request or never, and approvals can go to you or to an automatic reviewer (auto_review). Its cli_auth_credentials_store setting picks file, keyring, auto or ephemeral storage (config reference).

Claude Code offers Manual, plan, accept edits, auto and bypass permission modes. Its sandbox isolates shell commands on macOS, Linux and WSL2; MCP servers and hooks run outside it. On a Mac its login sits in the Keychain; on Linux it is a 0600 file at ~/.claude/.credentials.json.

What this means for you: on Windows, Codex gives you real isolation without WSL. On a Mac or Linux box both are solid, and the choice comes down to whether you prefer Codex’s explicit sandbox modes or Claude Code’s classifier.

Model cost of one task: measured in Atomic Agent

On the same coding task in Atomic Agent, our own harness, GPT-6.2 Sol cost an average of $0.33 per run and Opus 5.5 at its default medium effort cost $0.97. Both passed all 59 hidden tests. These are model costs through Atomic Agent at API prices, not runs inside Codex or Claude Code, which add their own prompts and tools.

The task: a 1,400-line Python warehouse library with 13 planted bugs and one missing feature, scored by 59 hidden tests. We ran it through Atomic Agent with OpenRouter, pinned to OpenAI for Sol and to Anthropic for Opus. The Sol runs used Atomic Agent v0.6.13 and the Opus runs used the build shipped as v0.7.0, so the harness version differs between the two.

Model (our harness)Tests passedCost per runTimeSteps
GPT-6.2 Sol, 3 runs59/59 each$0.29-$0.41, average $0.332.8-3.3 min15-20
Opus 5.5, medium effort, 3 runs59/59 each$0.97 ($0.96-$1.00)4.2 min10
Opus 5.5, high effort, 3 runs59/59 each$1.70 ($1.54-$1.98)9.6 min17 (13-25)

The Sol runs are detailed in our GPT-6.2 Sol vs Opus 5.5 write-up, and the Opus 5.5 medium and high runs in Fable 5.2 vs Opus 5.5.

What this means for you: Sol took more steps but cost about a third as much per run at API prices. On a subscription you do not see per-run cost, and neither vendor says how plan limits map to API spend, so treat this as a guide to API billing only.

A third option: Atomic Agent

We build Atomic Agent, so weigh this section accordingly. It is an MIT-licensed, local-first agent whose default model runs on a local llama-server, so you can start with no API key. It works with OpenAI and Anthropic keys too, which is how we ran the measurement above.

What matters for this comparison:

  • Both model families in one tool. Use GPT-6.2 Sol and Opus 5.5 through your own keys or OpenRouter, and switch per task.
  • Local by default. The default provider is a local llama-server on 127.0.0.1; Ollama and LM Studio presets need no key.
  • Imports from Claude Code. Skills, memory, MCP servers, sessions and, if you opt in, your Anthropic API key.
  • No subscription login. Atomic Agent cannot use ChatGPT or Claude plans; cloud models are billed per token by the provider.
  • Telemetry is on by default. Events carry provider, model, token and cost data without message content. Turn it off with analytics.enabled: false.

For more options, see our list of open-source Claude Code alternatives. To try Atomic Agent, download it here.

Frequently asked questions

FAQ

Codex vs Claude Code, answered.

  • Can I use my ChatGPT subscription in Codex?

    Yes. Codex signs in with ChatGPT Plus, Pro, Business, Edu and Enterprise accounts, and Plus at $20 a month covers Codex on the web, CLI, IDE extension and iOS. Free and Go accounts get GPT-6 Luna in the desktop app only. You can also sign in with an OpenAI API key and pay per token.

  • Can Claude Code use GPT models?

    No, not with Anthropic's support. Anthropic's gateway docs say it does not support routing Claude Code to non-Claude models. Codex is the reverse case: it ships built-in provider IDs for OpenAI, Ollama and LM Studio, and any OpenAI-compatible endpoint can be added as a custom model provider in config.toml.

  • Does Codex run on Windows without WSL?

    Yes. Codex documents a native Windows sandbox next to Seatbelt on macOS and bubblewrap on Linux and WSL2. Claude Code's shell sandbox covers macOS, Linux and WSL2; on native Windows its commands run unsandboxed.

  • Is Codex open source?

    Yes, the Codex CLI is Apache-2.0 licensed on GitHub, with about 136,000 stars in November 2026. The models behind it and Codex Cloud are not. Claude Code is proprietary; its GitHub repo holds issues and plugins, not the agent's source.

  • Which has higher limits on the $20 plan?

    It depends on the model. ChatGPT Plus lists 17-180 GPT-6.2 Sol messages and 6-50 GPT-6.2 Astra messages per five hours in Codex, plus weekly limits. Claude Pro does not publish message counts for Claude Code. If you hit the cap often, both vendors push you to the $100 tier.

Claude Code vs Codex: which should you pick?

If your company already pays for one of the two subscriptions, start there: the agent is included and switching costs you a second $20. If you pay nothing yet, try both for a month on the entry plan with the same repo, and watch how often each one hits its limit.

Developers on native Windows, or anyone who wants local models in the same tool, will find Codex fits with less setup. Teams that standardized on CLAUDE.md, hooks and Claude models will find Claude Code fits better. For a third comparison point, see OpenCode vs Claude Code.


Plans, limits, API prices, sandbox modes and config options were checked against learn.chatgpt.com, claude.com/pricing and code.claude.com on November 18, 2026. GitHub star counts are approximate. Cost figures are our own runs of one task through Atomic Agent v0.6.13 (GPT-6.2 Sol) and the build shipped as v0.7.0 (Opus 5.5) at API prices; we have not yet run the task inside Codex or Claude Code.


Get new posts
by email

One email when we post something new.

Share
Written by
Nadya Dudka Product, Atomic Agent
Andrew Dyuzhov SEO and growth

Run your local agent
in one click