Codex vs Claude Code in 2026: setup, pricing, sandboxing, which to pick

Codex vs Claude Code in 2026: setup, pricing, sandboxing, which to pick

Codex is OpenAI's coding agent and Claude Code is Anthropic's; both read your repository, edit files, run commands and open pull requests, from a terminal, an IDE, a desktop app or the cloud. The real differences are the models, how each plan is billed, and how safety works by default. This comparison covers all three as of November 2026 and ends with a pick for each kind of job.

In shortTL;DR
  • Both are full coding agents with a CLI, IDE extensions, cloud tasks, MCP, skills, hooks and subagents; the gap between them is smaller than most comparisons suggest.
  • Codex runs OpenAI models and comes with ChatGPT plans (Plus at $20 a month is the first with the CLI and IDE extension); Claude Code runs Claude models and needs Claude Pro ($20) or higher, or API credits.
  • Codex starts inside an OS-enforced sandbox with network off; Claude Code's Bash sandbox is off until you run /sandbox, and it relies on permission modes and an auto-mode classifier instead.
  • Project instructions live in AGENTS.md for Codex and CLAUDE.md for Claude Code, but Claude Code reads AGENTS.md when there is no CLAUDE.md, so one file can serve both.
  • Pick by job and by the subscription you already pay for, and try both on the same real task before you commit.

Codex vs Claude Code: what is the actual difference?

Codex and Claude Code are the same kind of tool: an AI agent that works through a task in your repository by reading files, editing code and running commands until it is done, then hands you a diff or a pull request. The difference is who makes it, which models it runs, how it is billed, and how much it locks down by default.

  • Codex is OpenAI's agent. It comes with ChatGPT plans, runs OpenAI models, and is available in the ChatGPT desktop app, a CLI, an IDE extension, the web, iOS and as cloud tasks. The Codex CLI is open source under Apache-2.0.
  • Claude Code is Anthropic's agent. It comes with Claude plans or API credits, runs Claude models, and is available in the terminal, IDE extensions, a desktop app, the web and the Claude mobile app.

In 2026 the two products have converged. Both support MCP servers, skills in the open Agent Skills format, lifecycle hooks, subagents, plugins, a non-interactive mode for scripts, a GitHub Action and cloud tasks that keep running when your laptop is closed. Comparisons that call one "the terminal tool" and the other "the cloud tool" are out of date.

So the useful questions are narrower: which models suit your work, which subscription you already pay for, and which safety model you want when the agent runs unattended.

How do Codex and Claude Code compare feature by feature?

Feature for feature, the two tools are close; the table shows where they differ in names, files and defaults. Facts are as of November 2026 from each vendor's docs.

CodexClaude Code
MakerOpenAIAnthropic
SurfacesChatGPT desktop app, CLI, IDE extension (VS Code, Cursor, Windsurf; Xcode and JetBrains integrations), web, iOSCLI, VS Code and JetBrains extensions, desktop app, web, Claude mobile app
Install CLInpm install -g @openai/codex, Homebrew or install scriptcurl -fsSL https://claude.ai/install.sh | bash, Homebrew, WinGet or Linux packages
ModelsOpenAI models; local models through Ollama or LM StudioClaude models only
BillingChatGPT plan, credits, or API keyClaude plan or API credits
Project instructionsAGENTS.mdCLAUDE.md, falls back to AGENTS.md
Config~/.codex/config.toml, project .codex/config.toml~/.claude/settings.json, project .claude/settings.json
Skills folder.agents/skills/, ~/.agents/skills/.claude/skills/, ~/.claude/skills/
Default local safetyOS sandbox on, network off, approvals on requestPermission mode (auto mode in recent versions); Bash sandbox off until enabled
Non-interactivecodex exec "..."claude -p "..."
GitHub Actionopenai/codex-action@v1anthropics/claude-code-action@v1
Cloud tasksCodex Cloud (Plus and above)Cloud sessions (Pro and above)

Billing follows the wider product in both cases. Codex lives inside ChatGPT, and the same usage limits cover ChatGPT Work and Codex. Claude Code draws from the same pool as Claude on the web, desktop and mobile. If you already pay for one of the two, that usually decides your first agent.

Which models do Codex and Claude Code use?

Codex runs OpenAI's GPT models and Claude Code runs Anthropic's Claude models; you can't swap one family into the other in the default setup. Model choice changes speed, cost and quality more than anything else in either tool.

As of November 2026, OpenAI's Codex models page recommends Astra for the most demanding work, GPT-6.1 Sol for "near-Astra performance" at lower cost, GPT-6.1 Terra as a fast, efficient option and Luna for focused, repeatable tasks. You switch with /model in the CLI or codex -m <model>. Codex can also point at local models through LM Studio or Ollama with its oss_provider setting.

Claude Code runs Claude models, including Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1. You switch with /model, and subagents can run on a cheaper model than the main session. On Claude plans, Fable is paid with usage credits on Pro and included up to half the weekly limit on Max, according to the Claude pricing page.

Both tools also let you set reasoning effort and offer faster modes. Speed costs allowance: in Codex, Fast mode uses included subscription usage at 2.5 times the Standard rate, so check the model notes before you switch a long task to a fast mode.

How much do Codex and Claude Code cost in November 2026?

Both start at $20 a month for a plan that includes the CLI and IDE tools, and both have higher tiers at $100 and $200 a month. Usage on either is limited by rolling windows rather than a fixed message count, so the right plan depends on how long your agents run.

Plan levelCodex (ChatGPT plans)Claude Code (Claude plans)
Free$0: GPT-6 Luna in the desktop app, subject to rollout$0, Claude Code not included
Entry paidGo $8/month: GPT-6 Luna in the desktop app, subject to rolloutNone
StandardPlus $20/month: web, CLI, IDE extension, iOS, cloud code reviewPro $20/month or $200/year: Claude Code included
Heavy usePro from $100/month, with $200 and $500 tiersMax $100/month (5x Pro usage), Ultra $200/month (10x Pro weekly usage)
TeamsBusiness $20/user/month billed annually, $25 monthlyTeam $20/seat annually, $25 monthly; premium seats $100/$125
Pay as you goAPI key at API rates, no cloud featuresAPI credits at API rates

Sources: Codex pricing and Claude pricing, checked November 2026. Prices exclude tax.

How the limits work differs in detail:

  • Codex measures local messages per five-hour window on Plus and Business, may add weekly limits, and says Pro plans currently have no five-hour limit. Cloud tasks can use more of your allowance than local messages. Plus and Pro users can buy credits when they hit the limit. Check usage in a CLI session with /status.
  • Claude plans use a rolling five-hour window plus weekly limits, shared across Claude chat and Claude Code. Ultra has no five-hour limit for verified accounts. Our guide to Claude Code usage limits covers how to stretch them.

Both vendors warn that similar-looking tasks can consume very different amounts. Run your normal workload for a week and read each usage dashboard before you upgrade.

How do sandboxing and permissions compare?

Codex locks the agent in an operating-system sandbox by default and asks before leaving it; Claude Code asks for permission per action (or lets a classifier decide in auto mode) and treats its Bash sandbox as an opt-in layer. Both get you to the same place, but you configure them differently.

Codex has two layers, described in its approvals and security docs:

  • Sandbox mode decides what commands can technically do: read-only, workspace-write or danger-full-access. It uses Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native sandbox on Windows. Network access is off by default.
  • Approval policy decides when Codex stops to ask: on-request or never. In a git repository Codex starts in the Auto preset, which is workspace-write plus on-request. Even in that mode .git, .codex and .agents stay read-only.

Claude Code works from permission modes, plus an optional Bash sandbox:

  • Modes range from default (Manual: asks before edits and commands) through acceptEdits, plan and auto (a classifier model reviews actions instead of you) to dontAsk (only pre-approved tools) and bypassPermissions (containers and VMs only). Recent versions start in auto mode.
  • The Bash sandbox wraps shell commands with OS-level file and network limits on macOS, Linux and WSL2. It is off by default; turn it on with /sandbox. File tools, hooks and MCP servers run outside it.
  • Deny rules in settings block a tool in every mode, including bypassPermissions.
You wantCodexClaude Code
Read and plan only--sandbox read-only--permission-mode plan
Edit the repo, ask for anything risky--sandbox workspace-write --ask-for-approval on-request (default in git)--permission-mode acceptEdits or auto
Locked-down CI with an allowlistcodex exec (read-only by default)claude -p ... --permission-mode dontAsk --allowedTools "..."
No prompts at all, in a container--dangerously-bypass-approvals-and-sandbox--dangerously-skip-permissions
Warning

The "no prompts" flags in both tools remove the safety net. Use them only inside a container or VM that holds no credentials you would mind losing.

If you plan to let either agent run unattended, our guide to prompt injection in coding agents explains why network limits and secret hygiene matter more than which tool you pick.

How do instructions, skills and extensions compare?

Both tools read a Markdown instructions file, load skills on demand, connect MCP servers and run hooks; mostly the file names differ. One repository can serve both agents with a little setup.

ConceptCodexClaude Code
Always-loaded instructionsAGENTS.md, merged from repo root down, 32 KiB by defaultCLAUDE.md files; reads AGENTS.md if no CLAUDE.md exists
On-demand proceduresSkills (Agent Skills standard), $skill-nameSkills (Agent Skills standard), /skill-name
Lifecycle scriptsHooksHooks
External toolsMCP serversMCP servers
Delegated workersSubagents and custom agentsSubagents in .claude/agents/
PackagingPluginsPlugins

Claude Code's handling of AGENTS.md is the useful detail. According to its memory docs, Claude reads AGENTS.md as project instructions when there is no CLAUDE.md in your working directory or above it. If you also want Claude-specific notes, a CLAUDE.md can import AGENTS.md.

Skills port the same way. Both tools follow the Agent Skills format, so a SKILL.md that uses only the standard fields works in both. Codex looks in .agents/skills/ and Claude Code in .claude/skills/, and both follow a symlinked skill folder, so keep one copy and link each skill into the other tree. Our guides to Claude Code skills and the Codex CLI cover each side.

How do cloud tasks and background work compare?

Both vendors run agents in their own cloud so work continues while your computer sleeps, and both let you start and check those tasks from a phone. Each cloud task gets an isolated workspace cloned from GitHub.

Rows of server racks in a data center aisle
Cloud tasks run on the vendor's machines, not your laptop.
  • Codex Cloud runs tasks from a published cloud environment: the repositories, dependencies and access settings Codex prepares and tests with you. Each task gets its own workspace from that environment. You start tasks from the web, the desktop app or mobile, and Codex also offers automatic GitHub code review on paid plans.
  • Claude Code cloud sessions run on Anthropic-managed infrastructure on Pro, Max, Ultra and Team plans. You start them from claude.ai/code, the Code tab in the Claude app, the desktop app, or the terminal with --cloud, and you can move a session between cloud and local with --teleport.

For scripted runs on your own machines, both have a headless mode. codex exec defaults to a read-only sandbox and prints JSON Lines with --json. claude -p prints text, JSON or stream-JSON with --output-format and adds --bare for reproducible CI runs; see Claude Code headless mode for the details.

Vendor clouds have limits: the environment is theirs, cloud tasks count against the same plan limits, and some features depend on GitHub. If you want agents on a machine you control that stays on around the clock, Orkio rents an always-on, isolated cloud server where Claude Code and Codex keep working after you close your laptop; Claude Code runs on your own Claude account, so there is no markup on model usage.

Which should you pick for which job?

Pick the agent that comes with the subscription you already pay for, then switch per job where one has a clear edge. Many teams end up using both, each for the tasks where it does better on their own code.

Your situationStart withWhy
You already pay for ChatGPT Plus or ProCodexCodex usage is included, no second subscription
You already pay for Claude Pro, Max or UltraClaude CodeClaude Code usage is included
You want the strictest local default with no setupCodexOS sandbox and network-off are on from the first run
You want fine-grained per-tool rules and hooks in settingsClaude CodePermission rules, modes and hooks in one settings file
You want to try local or self-hosted modelsCodexoss_provider supports Ollama and LM Studio
You run long refactors and want a second opinionBothOne writes, the other reviews the pull request

Benchmarks rarely settle this. Each vendor reports scores from its own test setup, and results swing with the model version, which changes every few months. A better test takes an hour:

  1. Pick a real, finished ticket from your backlog with a clear acceptance test.
  2. Write the task once, in a shared AGENTS.md plus the same prompt for both tools.
  3. Run Codex and Claude Code on separate branches or git worktrees, each with its default model.
  4. Compare the diffs, the tests, how often you had to step in, and the usage each dashboard shows.
  5. Repeat with one hard task, such as a cross-module refactor, before deciding.

How to run Codex and Claude Code in the same repository

Running both agents on one codebase takes five small steps, and it lets you use each where it does best.

  1. Write AGENTS.md with build, test and style commands. Codex reads it directly.
  2. Skip CLAUDE.md, or keep it short and import AGENTS.md, so Claude Code sees the same rules plus anything Claude-specific.
  3. Share skills by keeping each one in .agents/skills/<name>/ and symlinking that folder into .claude/skills/, using only the standard frontmatter fields.
  4. Mirror the safety rules. Deny .env and secret paths in .claude/settings.json, and keep Codex in workspace-write with network off unless a task needs it.
  5. Give each agent its own branch or worktree, and review every pull request the same way, whoever wrote it.
terminal
# Optional: Claude Code already reads AGENTS.md when no CLAUDE.md existsprintf '@AGENTS.md\n' > CLAUDE.md# One copy of each skill, linked into Claude Code's foldermkdir -p .claude/skillsfor d in .agents/skills/*/; do  ln -s "../../$d" ".claude/skills/$(basename "$d")"done

Frequently asked questions

Is Codex better than Claude Code?

Neither is better for every task. Both are capable agents with similar features, and results depend more on the model you pick, the task description and your repository's tests than on the tool. Run the same real task in both and compare the diffs, the time you spent steering, and the usage it cost.

Can I use Claude models in Codex or OpenAI models in Claude Code?

Not in the default setup. Codex is built around OpenAI models, though its config can point at other providers and at local models through Ollama or LM Studio. Claude Code runs Claude models, through a Claude plan, the Anthropic API, or cloud providers such as Amazon Bedrock.

Which is cheaper, Codex or Claude Code?

Both start at $20 a month for a plan that includes the CLI, and both have higher tiers at $100 and $200. How far each plan goes depends on the model, the size of the task and how long the agent runs, and neither vendor publishes fixed message counts for every plan. Check each usage dashboard after a week of real work.

Can Codex and Claude Code work on the same repository?

Yes. Keep shared instructions in AGENTS.md, which Codex reads and Claude Code reads when no CLAUDE.md exists, or import it from a short CLAUDE.md. Give each agent its own branch or git worktree so they never edit the same checkout at once.

Does Codex or Claude Code work offline?

No. Both send your prompts and the code context they read to a hosted model. Codex can be configured to use a local model through Ollama or LM Studio, which keeps inference on your machine, but output quality then depends on the local model.

SOURCES

  1. OpenAI Codex docs: Pricing
  2. OpenAI Codex docs: Agent approvals and security
  3. OpenAI Codex docs: Models
  4. OpenAI Codex docs: Cloud environments
  5. Claude pricing
  6. Claude Code docs: Choose a permission mode
  7. Claude Code docs: Sandboxing
  8. Claude Code docs: Cloud sessions
  • #codex
  • #claude code
  • #ai coding
  • #comparison
Orkio team

The team building Orkio. We write about putting AI to work: coding agents that run overnight, always-on boxes and pull requests ready by morning.

Keep reading

All posts

07:06 · YOU MERGED #128

Go to sleep. Wake up to pull requests.

Start for $19 a month
© 2026 Orkio · Hosted in Europe TürkçeStatus