Codex vs Claude Code in 2026: Quality, Price, and Uptime

23 September 2026
20 min read

Codex and Claude Code are the two coding agents developers compare most often in 2026. OpenAI Codex is sold inside ChatGPT plans, and Anthropic's Claude Code is sold inside Claude plans. From the outside they do the same job: a developer opens a terminal in a repository and types a task, for example "rename this function across the project and fix the tests." The agent reads the code, makes the edits, runs the tests, and returns a diff. Each tool started in the terminal and has since moved into the IDE, the desktop, the cloud, and the phone.

The two look alike, so the differences show up only after a few weeks of work. By then the repository carries the vendor's instruction file, and the working day is built around the vendor's limits.

This article compares them on quality, price, and uptime. Every number below carries its source and the date it was read.

🎯 Quick answer

If you hand the agent small, clear tasks all day, take Codex. If you sit with it for hours inside one codebase, take Claude Code.

  • Behaviour. Codex does what the task says and stops. Claude Code reads wider and plans first, which saves you on a vague task and does extra work on a precise one.
  • Quality. Given the same 303 benchmark tasks, Codex solves about 190 and Claude Code about 191. Codex gets there on a third of the tokens.
  • Price. One benchmark task costs $7.47 on Codex against $12.39 on Claude Code.
  • Uptime. OpenAI's 100% skips "degraded" time and Anthropic's 99.4% counts every model error, so read the incident lists, not the percentages.

What Is Codex?

Codex is OpenAI's open source coding agent. The developer opens a terminal in a repository, describes a task, and the agent reads the code, plans the change, edits files, and runs the tests. Every command the agent runs goes through an operating-system sandbox. By default the agent changes files only in the folder you started it in, and it cannot reach the network at all. If the agent wants to install a package or reach an API, it asks first.

  • Where it runs. Codex is one product with five entry points: the CLI, an IDE extension, a desktop app, a cloud agent at chatgpt.com/codex, and the ChatGPT mobile app. They share one account and one usage allowance, and the session history follows across all five. A task can be handed to the cloud agent from the phone, and the result arrives as a diff without the laptop being involved.
  • What it is built from. The CLI is a single binary written in Rust and released as open source under the Apache-2.0 license. The source is in the openai/codex repository on GitHub.

What Is Claude Code?

Claude Code is Anthropic's coding agent. It starts from the same place as Codex, a terminal open in a repository, and does the same job. The difference is in how it behaves. Claude Code reads more of the repository before it edits and writes a plan first and when a task is ambiguous, it asks. Instead of an operating-system sandbox, it uses permission rules and hooks: scripts the developer writes that run before or after each action, for example a hook that runs the linter before every commit.

  • Where it runs. Claude Code has four entry points: the terminal, an IDE extension, the Claude desktop app, and Claude Code on the web. All of them draw from one Claude subscription, together with chat on claude.ai. For parallel work inside one session it uses subagents, each with its own context window; Agent Teams, which coordinate several sessions on one machine, are an experimental feature that is switched off by default.
  • What it is built from. Claude Code is not open source. The binary is published, so anyone can install it on their own server but Anthropic does not release the TypeScript source, and the LICENSE file in the anthropics/claude-code repository reads "Β© Anthropic PBC. All rights reserved." That lets you install it for your own work and rules out reselling it as a hosted service. The repository holds documentation, plugins, and issue tracking.
  • Hosting. A developer who needs it running around the clock uses Claude Code on the web or runs it on a server they manage themselves.

Why Developers Compare Codex and Claude Code

Developers who have used both tools describe the same four problems, in almost the same words.

The agent does more, or less, than it was asked. Claude Code reads files the task does not need and adds abstractions. Codex stops at the stated task. Which behaviour helps depends on how well the task is defined, and the Harness section compares the controls each tool gives over it.

The same result arrives by two different routes. Handed the same benchmark suite, the two agents finish one task apart. One gets there on a third of the tokens and five minutes less. The Quality section reads the results and the volume behind them.

The five-hour allowance decides how much work a plan holds. Both $20 plans stop accepting requests once the allowance runs out, and both vendors meter a weekly window on top; each changed its limits during 2026. The Price section compares what each tier buys.

A service error mid-edit leaves the repository half-changed. Both vendors run a status page with a component for their coding agent, and the two pages count incidents differently enough that their uptime figures cannot be compared as printed. The Uptime section reads both pages against their incident lists.

Codex vs Claude Code comparison table

Sources: status.openai.com, status.claude.com, Artificial Analysis, and the vendors' pricing and support pages, read September 22, 2026. Tasks solved, time and cost come from a benchmark suite run on each agent with the model its own maker ships, so a single real task can cost several times more or less. Neither vendor publishes a token allowance for a plan, so the table counts messages and tasks instead.

Neither is better across the board. On the same 303 tasks they finish one apart, and no gap in the three kinds of work is wider than three tasks. So pick by the week you actually have.

  • Take Codex if the tasks arrive already described. Same result on a third of the tokens and five minutes less, $7.47 a task against $12.39, and the allowance is published per model before you pay.
  • Take Claude Code if you work inside one codebase and cannot spell the task out. It is ahead on reading code it did not write, 80 of 124 against 77, it never leaves a task dead, and its extension surface is three times deeper.
  • Take both if the split is natural. They coexist in one repository, and moving settings from Claude Code into Codex takes one command.

Claude Code vs Codex CLI: Harness and Extensions

The harness is the program around the model. It decides how much the agent does on its own, when it stops to ask, what happens when the conversation gets too long, and where your own scripts can step in. Two agents with the same model behave differently because their harnesses differ.

Codex is the one you can predict. The rule fits in a line: it works inside the folder you started it in, the network is off, and it asks before crossing that line. What you write for it also travels, because Cursor, Windsurf and OpenCode read the same AGENTS.md.

Claude Code is the one you can rebuild. Three times as many places to hook your own scripts in, a plugin marketplace of its own, instruction files that pass down the directory tree, and auto mode, which stops asking you and puts a second model in front of each action instead.

The catch is that the road runs one way. /import moves a Claude Code setup into Codex in one command, and nothing comes back. Both instruction files live in the same repository without a fight, so you can run both agents, but what a team builds for Claude Code travels only towards Codex.

Code Quality: Codex vs Claude Code

Codex and Claude Code solve almost the same number of tasks. Artificial Analysis gave both agents the same 303, each running the model its own maker ships: Codex 0.153.4 with GPT-6 Astra and Claude Code 2.1.263 with Claude Fable 5.1, both at max effort, three attempts per task.

Codex is a few tasks ahead on changing code that already exists, Claude Code on reading unfamiliar code and in the terminal, and no gap is wider than three tasks. Whichever you pick, the other would have got the job done too. What separates them is how each one works.

Codex solved 190 and Claude Code 191 of the same 303 benchmark tasks: 76 vs 73 on repository patches, 77 vs 80 on explaining unfamiliar code, 37 vs 38 in the terminal

How Each Agent Approaches a Task

Codex does the task as written and stops. Claude Code reads files the task did not name, writes a plan first, and asks when the request is ambiguous. The difference shows up in what one task costs each of them:

Both take about the same number of steps, so the loop is the same length. Inside each step Claude Code reads 70% more of the repository and writes 2.8 times as much, and that is where the extra five minutes and the 66% higher bill come from. On a vague task the extra reading pays off. On a precise one it is work nobody asked for.

How Each Agent Works on Its Own

Neither vendor publishes how often an agent re-runs the tests or re-reads its own diff. Both publish something adjacent and easier to measure: a second, smaller model that inspects the agent's actions before they execute.

Sources: OpenAI's auto-review write-up and Anthropic's engineering post on auto mode, read September 22, 2026.

The two designs differ in when they look. Codex's reviewer wakes only when the agent reaches outside the working directory, so it interrupts about 200 times less than approving each step by hand. Claude Code's checks every tool call, catches more, and wrongly stops four actions in a thousand.

They also differ when the model refuses a task, mostly security work. Codex stops, as it did on 13 of 909 attempts. Claude Code passes the task to another model and finishes, as it did on 74, so you get the work but from a model you did not choose.

On code quality, the two land the same result by different routes. Codex keeps to the task and writes a third as much, at $7.47 a task, which suits work you can spell out in full. Claude Code reads wider, plans first, checks every step and costs $12.39, which pays off when you can only half describe the task. Neither benchmark tells you whether a patch is one you would merge. That comes down to the controls compared in the Harness section.

Sources: Artificial Analysis Coding Agent Index v1.5, read September 22, 2026. It prints an index score, 61.6 for Codex and 62.2 for Claude Code, and the task counts above are our estimate from its pass rates. Claude Code ran as the "with fallback" variant, and the repository questions are graded by Claude Opus 4.5.

Price: Claude Code vs Codex Pricing

The paid tiers line up at $20, $100, and $200. The difference is in what a tier contains and how much of it one task consumes.

Codex Usage Limits vs Claude Code Usage Limits

Sources: learn.chatgpt.com/docs/pricing and claude.com/pricing, September 22, 2026.

Codex publishes what each tier buys, model by model, and the cheaper the model the further the allowance stretches. Cloud chats draw on the same allowance and "may use more of your allowance than local messages." A turn that hits the limit is allowed to finish, and after that you buy credits, drop to a smaller model or wait for the reset.

Claude Code publishes multipliers and says "there's no fixed message count." The same allowance covers chat on claude.ai, so a long conversation in the browser eats into the agent's budget. When the limit lands, Pro and Max users can switch on usage credits at API rates or wait for the window to reset.

Both also meter a weekly window on top, and neither publishes its size. OpenAI says only that "weekly limits may also apply." Anthropic ran a 50% boost from May 13 to September 13, and from September 14 the limit sits 25% above its original level, a net cut of about 17% for anyone used to the boost. Whether either agent is usable without paying at all is covered in is Claude Code free.

Claude Code Pricing vs Codex Pricing: API Rates and Cost per Task

Both agents run on an API key instead of a subscription. List prices per million tokens:

Sources: developers.openai.com and platform.claude.com, September 22, 2026.

Sol's price is promotional through November 21, and long-context requests cost extra on OpenAI's side. Anthropic's prices hold across the window.

Codex is cheaper per task, $7.47 against $12.39. Both flagships list at the same $10 and $50 per million tokens, so the whole gap is volume.

One level down the prices meet. Since September 22 Claude Opus 5.5 lists at $4 and $20, exactly matching GPT-5.6 Sol, though no agent has been run with it yet.

On price, Codex is cheaper per task and easier to plan around. It costs less for the same work, and before you pay it tells you roughly how many messages a tier holds, while Claude Code gives only a multiplier. Neither publishes its weekly cap, so on both sides the real ceiling shows up only when you hit it.

Uptime: Claude Code vs Codex

While the vendor is down, the subscription is idle and the task is frozen mid-edit. Both vendors publish a status page with a component for their coding agent, and the two pages measure different things.

Sources: status.claude.com and status.openai.com, September 22, 2026. Anthropic reports uptime month by month, which comes to about 99.4% for Claude Code from July to September. OpenAI reports one figure for the Codex group, against 99.93% for its twelve API components and 99.63% for its fifteen ChatGPT ones.

Claude Code Status and Codex Status: What Each Page Counts

Anthropic marks the Claude Code component whenever a model behind it has elevated errors, so a developer on Fable 5.1 or Opus 5 sees more incidents than one on Sonnet 5. Between July 22 and September 16, 2026, the feed lists 35 incidents that include Claude Code, about 52 hours in total, most of them model-level and under two hours. The longest ran 7 hours on August 5. Two were specific to the agent rather than a model, a 3-hour outage of Claude Code and Cowork on August 28 and a 1-hour degradation on August 31.

OpenAI lists nine incidents naming Codex between June 25 and September 14, 2026. Two hit all four Codex components, a June 26 to 29 fault where an abuse-prevention system drained usage limits by mistake and a two-hour outage across ChatGPT and Codex on September 3. Both are recorded as "degraded performance," and that status does not lower the uptime figure, which is how the group still shows 100%. The longest, access errors in the desktop app and CLI on July 18, ran 4 hours 53 minutes.

Claude Code Outage and Codex Outage History

What can be compared is the incident lists. Claude Code had more interruptions, most under two hours. Codex had fewer, and its longest, on July 18, ran longer than any Claude Code incident with a published duration in the same window. Both vendors have had at least one incident that changed usage without an outage: OpenAI's June rate-limiting error, and Anthropic's mid-2026 changes to the weekly limit described in the Price section.

Codex looks more reliable on paper, 100% against 99.4%, but that gap is bookkeeping: OpenAI keeps degraded time out of its figure and Anthropic charges every model error to the agent.

Counted in incidents, Codex is ahead on how many and behind on how long the worst one ran. A vendor-side error ends the current turn either way, and both tools keep the session on disk, so only work that was not yet written to files is lost. Neither page covers the outage that stops a long run most often, the machine the session runs on going to sleep.

Is Codex Better Than Claude Code?

Codex or Claude Code: Choosing by Workload

Neither, and the benchmark says it plainly: 190 tasks against 191 out of 303. Codex leads on repository edits, Claude Code on reading unfamiliar code and in the terminal. Codex gets there on a third of the tokens and five minutes less, Claude Code on a wider read of the repository.

Choose Codex if the day's work arrives as scoped tasks, a rename, a migration, a failing test, a dependency bump: the allowance is published per model before payment, and the agent will not widen the task on its own. It is also the choice when tasks should keep running after the terminal closes: every entry point shares one allowance and one session history.

Choose Claude Code if the work is one long session over a codebase the agent must come to know, or if the team wants the deeper extension surface: 32 hook events against 12, output styles, a CLAUDE.md hierarchy with @path imports, and a plugin marketplace of its own.

Run both when the split is natural. AGENTS.md and CLAUDE.md coexist in one repository, and /import moves instruction files, MCP servers, skills, and the last month of chats from Claude Code into Codex, so trying the second tool costs an evening of setup. How Claude Code compares against an open-source agent instead is covered in OpenClaw vs Claude Code.

What People Think: Codex vs Claude Code on Reddit

The comparison threads that recur in r/ClaudeAI, r/codex, and r/ChatGPTCoding settle into one pattern: developers route work by task type instead of declaring a winner. The praise and the complaint describe one behaviour. Posts that credit Claude Code with inferring intent on a vague task tell it to stop writing novels on a precise one, and posts that credit Codex with staying on task ask for more initiative on an open-ended one. The recurring hard complaint on the Claude side is hitting the five-hour and weekly windows in the middle of work, which matches the Price section; the recurring one on the Codex side is waiting through long reasoning pauses, which matches the token counts in the Quality section.

How to Run Codex CLI

The CLI is the same binary everywhere, and installing it takes one command, npm install -g @openai/codex or brew install --cask codex, plus codex login. The harder question is where it runs, because a terminal session dies with the machine under it, and that outage appears on no status page.

OpenAI's cloud agent at chatgpt.com/codex runs a handed-off task on its own side, which covers short jobs well. What it does not give you is a machine that stays yours: a repository that stays checked out, hooks and skills that stay installed, a run that keeps going for hours with no browser tab open.

That is what Atomic Bot runs: Codex CLI on a dedicated managed instance, on 24/7, set up in one click, with no Docker and no server administration. The Base plan is $19 a month for 4 vCPU, 8 GB RAM, and an 80 GB SSD, and the instance signs into Codex with the developer's own plan or API key, set per instance.

A VPS you administer yourself is the third route. It runs either agent, Codex CLI with the commands above and Claude Code with its own installer, and it trades the setup and the updates for root access and any packages you want. How managed hosting compares against a VPS is covered in managed vs VPS vs self-hosted, and picking the server itself in best VPS for agent hosting.

FAQ

What is the difference between Codex and Claude Code?

Codex is open source, runs inside an operating-system sandbox and stops at the task you described. Claude Code is closed source, works through permission rules, and reads and plans more widely before it edits. Given the same 303 benchmark tasks they solve about 190 and 191, and Claude Code writes about three times more tokens to get there.

Is Codex free?

The free ChatGPT tier includes limited Codex access, enough to try it and not enough to work with. Paid use starts at $8 a month on Go and $20 on Plus. Claude Code has no free tier at all and starts at $20. What you can get out of either without paying is covered in is Claude Code free.

Which agent is better, Claude Code or Codex?

Neither. Out of the same 303 benchmark tasks Codex solves about 190 and Claude Code about 191. Codex wins on time and cost per task, 29.4 minutes and $7.47 against 34.8 minutes and $12.39. Claude Code wins on reading code it did not write and on the depth of its extension system, 32 hook events against 12.

Which scores higher on SWE-bench, Codex or Claude Code?

Neither vendor headlined SWE-bench Verified for these two models. OpenAI's launch table publishes DeepSWE v1.1 instead, an agentic coding benchmark, at 74.1% for GPT-6 Astra against 67.4% for Claude Fable 5.1, and Artificial Analysis does not run SWE-bench at all. Measured inside the agents, on 113 repository tasks Codex solved 76 and Claude Code 73.

Can you use Codex and Claude Code together?

Yes. AGENTS.md and CLAUDE.md sit in the same repository without clashing, and Codex's /import copies settings, skills and the last month of chats out of Claude Code. A common split is planning in one and execution in the other.

Can I use my own API key instead of a subscription?

Yes on both sides, and it changes more than the bill. Codex on an API key loses the cloud features, from GitHub code review to cloud sandboxes. Claude Code with ANTHROPIC_API_KEY set in the shell ignores the plan entirely and bills that key at API rates, with Console rate limits in place of the five-hour window.

Is the Claude Code Max plan worth it?

Max buys 5x or 20x the Pro allowance and makes Opus 5 the default. It pays off if you hit Pro's five-hour window most days. If you hit it once a week, Pro plus usage credits at API rates costs less.

Can I run Codex CLI in the cloud?

Two ways. OpenAI's cloud agent at chatgpt.com/codex runs tasks on its side within your plan allowance, and Atomic Bot runs the full CLI on an instance that keeps working after you close the terminal.

Get started

Codex runs on Atomic Bot in one click. Pick the agent, pick a plan, sign in with your own ChatGPT account or API key, and the instance stays on 24/7, so a task handed off in the evening is finished when you come back to it. Base is $19 a month for 4 vCPU, 8 GB RAM and an 80 GB SSD, with no Docker and no server administration.

Codex Claude Code
Entry pointsCLI, IDE, desktop app, cloud agent, phoneCLI, IDE, desktop app, web
Sourceopen source, Apache-2.0not open source, binary only
Account setupChatGPT account, no phone verification since August 2026. Card issued in a supported countryClaude account, ID check possible on personal plans, SMS number from a supported country and no VoIP, card from a supported country. China, Russia, Belarus, Iran, North Korea and Hong Kong are outside the list
How the agent behavesdoes the stated task and stops, inside an OS sandbox with network offreads wider and plans first, inside permission rules with auto mode on paid plans
Extensions and hooks12 hook events, AGENTS.md read by other tools too32 hook events, CLAUDE.md read by Claude Code alone
Benchmark tasks solved190 of 303191 of 303
Time and tokens for one task29.4 min and 47,000 tokens written34.8 min and 134,000 tokens
What $20 a month gives you5 to 45 messages every five hours on Astra, 10 to 100 on Solno number published, only "5x or 20x more than Pro"
Cost of one task on an API key$7.47, so $20 pays for under three$12.39, so $20 pays for about one and a half
Uptime the vendor reports100%, with time marked "degraded" left out of the count99.4% from July to September, with model errors counted in
Codex Claude Code
Scope of workdoes the stated task and stops. One dial, reasoning effortreads files the task did not name, plans first, explains in comments. The Concise output style trims the narration
Where the boundary isthe operating system. Edits inside the working directory, network off, asks before crossing that linea set of rules. Auto mode puts a second model in front of every action, manual mode asks before most edits
Long conversationsauto-compaction, /compact, PreCompact and PostCompact hooks, subagents for verbose workthe same, plus /clear and /autocompact
SkillsSKILL.md folders in the open agentskills.io formatthe same format, so skills move between the two
Pluginsshares its plugin directory with ChatGPTkeeps a marketplace of its own
Instruction fileAGENTS.md, also read by Cursor, Windsurf and OpenCodeCLAUDE.md, with a directory hierarchy and @path imports, read by Claude Code alone
Out of the same 303 tasks Codex + GPT-6 Astra Claude Code + Fable 5.1
Landing a patch in an existing repository, 113 tasks7673
Explaining code it has never seen, 124 questions7780
Getting a job done in a terminal, 66 tasks3738
Solved in totalabout 190about 191
Per task Codex + GPT-6 Astra Claude Code + Fable 5.1
Output tokens written47,000134,000
Input tokens read from the repository3.3M5.6M
Steps3937
Time29.4 min34.8 min
Cost on an API key$7.47$12.39
Checking an action before it runs Codex, auto-review Claude Code, auto mode
When the check fireswhen the agent reaches across the sandbox boundaryon every tool call, once an allowlist and in-project edits have passed it
Which model does the checkingGPT-5.4 Thinking at low reasoningClaude Sonnet 4.6
How often work goes straight through99.1% of escalated actions, 99.93% of all of them0.4% of 10,000 real actions were stopped by mistake
What it misses90.3% recall on overeagerness, 99.3% on prompt injection17% of 52 real overeager actions, 5.7% of 1,000 planted exfiltration attempts
What happens after a refusalCodex found a safer route in more than half of internal casesafter three refusals in a row, or twenty in a session, it asks a person
Plan level Codex (ChatGPT) Claude Code (Claude)
FreeLimited Codex accessNo Claude Code
EntryGo, $8/monthn/a
$20PlusPro ($17/month billed annually)
$100Pro 5x: 5x Plus usageMax 5x: 5x Pro usage
$200Pro 20x: 20x Plus usageMax 20x: 20x Pro usage
MeteredAPI key at API rates, no cloud featuresConsole API key or usage credits at API rates
Tier Codex In / Out Claude Code In / Out
FlagshipGPT-6 Astra$10 / $50Claude Fable 5.1$10 / $50
MidGPT-5.6 Sol$4 / $20Claude Opus 5.5$4 / $20
WorkhorseGPT-5.6 Terra$2 / $12Claude Sonnet 5$2 / $10
CheapestGPT-5.6 Luna$0.20 / $1.20Claude Haiku 4.5$1 / $5
Component Uptime Window
Claude Code99.09%, 99.59%, 99.63%July, August and September 2026
Claude API99.14%, 99.72%, 99.63%July, August and September 2026
Codex, 4 components100%June to September 2026

‍

read also