Omniscio

OmniscioCompareClaude Code vs Codex

Claude Code vs Codex: which one to use for agentic coding

Claude Code is Anthropic's coding agent. Codex is OpenAI's. Both read a repository, edit files and run the commands you already have installed, and both can keep several tasks apart by giving each one its own git worktree. The choice usually comes down to the account you already pay for, the operating system you work on, and how much each one asks before it acts. Everything below was read from each vendor's own documentation on October 25, 2026.

Last tested on Claude Code 2.1.310, October 25, 2026. By the Omniscio team. Updated .

How do Claude Code and Codex compare?

Claude CodeCodex
What it isAnthropic's coding agent, in a terminal, an editor, a desktop app and a browser.OpenAI's coding agent, in a terminal, an editor, a desktop app and the cloud.
How you install itAn install script or PowerShell one-liner, Homebrew, WinGet, or a Linux package.An install script or PowerShell one-liner, npm, or Homebrew.
Where it runsTerminal, VS Code, JetBrains, a desktop app, the web, and a phone app.Terminal, a VS Code family extension, Xcode and JetBrains, the ChatGPT desktop app, cloud tasks and a phone app.
Several tasks at onceA worktree per session, a background session list, subagents, and sessions that keep running after the laptop closes.A worktree per chat, cloud tasks that each get their own workspace, and subagents.
Before it actsSix permission modes, plus an optional sandbox around shell commands on macOS, Linux and WSL2.An OS-enforced sandbox with an approval policy, on macOS, Linux, WSL2 and native Windows.
What you can addCLAUDE.md, skills, hooks and MCP servers.AGENTS.md, skills, hooks, MCP servers and plugins.
PriceA Claude plan from Pro upward, or API tokens billed per use.A ChatGPT plan from Free upward, or API tokens billed per use.

Both are sold as part of a subscription, and both can be run on metered API billing instead. Neither vendor includes the other's credits, so whichever plan you already hold is the cheapest way to try that vendor's agent.

What does Claude Code do well?

Claude Code is the same engine in every place it runs. The documentation says each surface connects to the same underlying engine, so your CLAUDE.md files, settings and MCP servers follow you from the terminal to the editor to the desktop app. The terminal build is the most complete of them: scripting and the Agent SDK are CLI-only, and the third-party providers Anthropic lists work there too.

For parallel work the pieces are separate and you can take only the ones you want. The --worktree flag gives a session its own copy of the repository on its own branch, so one session can build a feature while a second fixes a bug. The claude agents command opens one screen listing every background session, what each is doing and which ones want your input. Subagents take a side task in their own context window and return only the summary.

Work also keeps going when you step away. A cloud session runs on Anthropic's infrastructure, keeps running after you close the laptop, and counts against your plan's usage limits with no separate charge for the virtual machine. Remote Control drives a local session from claude.ai or the phone app, and cloud scheduled tasks run on a schedule even when your computer is off.

On safety the default is more permissive than its reputation suggests. From version 2.1.283, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions, and it runs everything with background safety checks instead of asking about each step. The other modes are there when you want them: Manual lets reads through and asks about everything else, and bypass permissions is for an isolated container. The sandbox is a separate switch, off by default, that wraps shell commands on macOS, Linux and WSL2. Checkpoints capture the state of your files before each turn, so a bad turn can be rewound.

For teams there is a Code Review integration that comments on pull requests in GitHub, and it never approves or blocks one, so the merge decision stays human. On the data side, consumer plans carry a setting that decides whether your data may be used to improve future models.

What does Codex do well?

Codex is the cheaper of the two to try, because it sits inside a subscription many people already have. OpenAI's documentation says Codex is included on every ChatGPT plan, from Free up, and the Free plan covers quick coding tasks rather than none. It runs in a terminal, an editor, the ChatGPT desktop app, the browser and a phone app.

The sandbox is the half Codex is more explicit about. Commands run inside a boundary the operating system enforces, OpenAI says the implementation differs across macOS, Linux, WSL2 and native Windows but the idea is the same, and it is on before you configure anything, though on Linux and WSL2 it needs bubblewrap installed first. By default the agent has no network access and may write only inside the workspace. A separate approval policy decides when it stops to ask, so it asks when it needs to leave that boundary rather than on every command.

Parallel work has two shapes. In the desktop app a chat can run in a worktree, which OpenAI describes as running several independent chats in one project without interference. In the cloud, a task starts from a published environment, gets its own workspace, and keeps working while your computer is asleep. Subagents and custom agents let a task be split between agents with different instructions or models.

Configuration is a chain of AGENTS.md files, read from your Codex home directory down to the directory you are in, with the files nearest you taking precedence and a 32 KiB cap on the combined text. MCP servers, hooks, skills and plugins are all supported, and scheduled tasks can run on their own background worktrees so they do not collide with what you are doing.

Part of Codex is developed in the open. The CLI, the SDK and the app server live on GitHub, while the IDE extension and the cloud are not open source, and the repository takes issues rather than outside code. A local codex review checks uncommitted changes, a commit or a branch without touching your working tree.

Where do they differ most?

The account you already pay for

Claude Code starts at the Pro plan. Anthropic's pricing page lists Claude Code as not included on Free and included from Pro upward, at $17 a month on the annual rate or $20 monthly, and Max raises the usage ceiling from $100 a month. Codex starts lower, because the Free ChatGPT plan includes it on quick tasks, and Plus at $20 a month is the first plan with the larger model and code review in the cloud.

Metered billing exists on both. Anthropic says Claude Code charges by API token consumption, and puts the average enterprise cost at around $13 per developer per active day. OpenAI sells an API key path for Codex with no cloud features attached, billed at API prices. Neither route includes a monthly allowance, so a metered bill is open-ended in a way a plan is not.

Your operating system, and what the sandbox covers

Both install natively on Windows, macOS and Linux, and both sandboxes are enforced by the operating system, Anthropic's through Seatbelt on macOS and bubblewrap on Linux and WSL2. The differences are where each one applies and whether you have to switch it on. Anthropic's sandbox covers shell commands only, runs on macOS, Linux and WSL2, is off by default, and leaves commands on native Windows unsandboxed. OpenAI's is on by default, covers spawned commands, and is enforced on native Windows too.

How much it asks before acting

Claude Code exposes the question directly as permission modes, each stating what runs without a prompt: reads only, reads and edits, a plan mode, an auto mode with background checks, a locked-down mode for scripts, and bypass. Anthropic's documentation says auto mode is the built-in starting mode for interactive terminal and VS Code sessions from v2.1.283, and that a session starts in Manual instead when auto is unavailable to it. Codex splits the same question in two, into what the sandbox technically allows and when the agent must ask, with the default asking only at the edge of the workspace or for the network.

What happens when you walk away

Both let a task run somewhere other than your machine, and the difference is the setup. Claude Code runs a cloud session on Anthropic's infrastructure from Pro upward, counts it against plan usage, and charges nothing separate for the virtual machine, and a phone or a browser can steer a session that is still on your own machine. Codex asks you to publish an environment for the repository once, then starts each task from it in its own workspace, and the work counts against your ChatGPT usage.

Several tasks in one project

Both land on the git worktree as the unit of isolation, and the surrounding furniture differs. Claude Code adds a background session list and subagents inside one conversation. Codex adds worktree chats in the desktop app and scheduled tasks that run on their own background worktrees.

What you can teach it

The instruction files are the visible difference. Claude Code reads CLAUDE.md, and can read an existing AGENTS.md in its place. Codex reads a chain of AGENTS.md files from the home directory down to your working directory and stops at a 32 KiB cap. Both take MCP servers, hooks, skills and subagents, and Codex adds plugins, so the extension surface is close to even.

Openness

OpenAI publishes part of Codex as open source: the CLI, the SDK and the app server. Its IDE extension and its cloud are not open source, and the repository accepts bug reports and reproduction steps rather than outside code contributions. Anthropic's documentation describes an Agent SDK for building on Claude Code, but we found no equivalent statement that the Claude Code client itself is open source, so we make no claim either way.

What we ran ourselves

Both tools lean on the same mechanism for parallel work: a git worktree per task. That mechanism is the part we could run on our Linux test machine without installing either vendor's app, so we ran it twice, one session in each of two working copies, each told to rewrite its own copy of the same file.

What the two command-line tools report about themselves

Both command-line tools were already installed on the machine, so the first thing we did was ask each one for its version and whether it was signed in:

$ claude --version
2.1.310 (Claude Code)
$ codex --version
codex-cli 0.164.0
$ codex login status
Not logged in

The Codex CLI refused no command and reported its version, but it has no sign-in on that machine, so no Codex turn was run for this page. Everything this page says about Codex rests on OpenAI's own documentation, and says so where it appears.

One working copy per task

Two working directories on two branches, one agent session in each, both told to rewrite their own copy of the same file:

$ git init -q /tmp/ccvx-demo
$ cd /tmp/ccvx-demo
$ printf '<h1>v1</h1>\n' > index.html
$ git add index.html
$ git -c user.name=capture -c user.email=capture@example.com commit -qm "first pass"
$ git worktree add ../ccvx-a -b session-a
Preparing worktree (new branch 'session-a')
HEAD is now at b266b77 first pass
$ git worktree add ../ccvx-b -b session-b
Preparing worktree (new branch 'session-b')
HEAD is now at b266b77 first pass
$ cd ../ccvx-a
$ claude -p "Rewrite index.html so its entire contents are exactly: <h1>changed by session A</h1>" --permission-mode acceptEdits
[reply omitted]
$ cd ../ccvx-b
$ claude -p "Rewrite index.html so its entire contents are exactly: <h1>changed by session B</h1>" --permission-mode acceptEdits
[reply omitted]
$ cd /tmp/ccvx-demo
$ cat ../ccvx-a/index.html
<h1>changed by session A</h1>
$ cat ../ccvx-b/index.html
<h1>changed by session B</h1>
$ git worktree list
/tmp/ccvx-demo  b266b77 [master]
/tmp/ccvx-a     b266b77 [session-a]
/tmp/ccvx-b     b266b77 [session-b]
$ cat ../ccvx-a/.git
gitdir: /tmp/ccvx-demo/.git/worktrees/ccvx-a
$ git -C ../ccvx-b status --short
 M index.html

Session B's directory holds only B's change, its status shows one modified file and nothing else, and session A's heading is still intact next door. The .git entry in each worktree is a text file pointing back at the one repository, not a second copy of it, which is why a worktree per task is cheap enough to make for every task.

Captured on our Linux test machine on October 25, 2026, with git 2.43.0, Claude Code 2.1.310 and codex-cli 0.164.0, in a throwaway repository. Nothing was installed for this page and no setting was changed. Lines starting with $ are the commands in the order they ran, and every other line is what the program printed. [reply omitted] stands for the agent's own reply: the page shows the git and shell output, which is the part that proves the point.

What happens without it

The same file, two writers, one after the other, with no worktree in between. This is what both tools exist to prevent:

$ git init -q /tmp/ccvx-shared
$ cd /tmp/ccvx-shared
$ printf "export const price = 1\n" > price.js
$ git add price.js
$ git -c user.name=capture -c user.email=capture@example.com commit -qm "first pass"
$ printf "export const price = 2   // session one\n" > price.js
$ printf "export const price = 3   // session two\n" > price.js
$ cat price.js
export const price = 3   // session two
$ git diff
diff --git a/price.js b/price.js
index 01f2d4d..4494c11 100644
--- a/price.js
+++ b/price.js
@@ -1 +1 @@
-export const price = 1
+export const price = 3   // session two

Session two's write replaced session one's. There was no conflict and no warning, git reports a single change, and the repository holds no trace that a first writer ran.

Captured on the same machine and day, in a second throwaway repository. The two writes stand in for two sessions, so the result does not depend on how any one agent decides to behave.

Not reproduced: any Codex session, because the command-line tool on our machine has no sign-in. Not reproduced: either vendor's desktop app, since this page was written on a Linux box with no display. Claims about those rest on each vendor's own pages and say so.

Which one should you use?

Claude Code fits if

  • You already pay for Claude Pro or Max, since the agent is included from Pro upward.
  • You want several sessions in one project and a single screen that says which of them is waiting on you.
  • You want to keep a session running in the cloud and steer it from a browser or a phone.
  • You want the sandbox to be a switch you turn on per session rather than one that is on by default.

Codex fits if

  • You already have a ChatGPT plan, where Codex is included.
  • You want a working sandbox on native Windows, or one that is on before you configure anything.
  • You want cloud work to start from a published environment, so the same repositories and tools are ready for every task.
  • You keep instructions in AGENTS.md, or you want the CLI's source available to read.

If you want both, Omniscio is the desktop app we make, and it runs either one as a session, with Codex switched on first in Settings. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported. A Codex session sits in the same list as a Claude one, signing in with your ChatGPT plan or an API key. Worktree isolation gives a session its own branch and working directory, switched on per session, per project or for the whole app. Sessions that need you float to the top of the list, a hard cap stops a session that runs on a metered key when it reaches its limit, and a session on a subscription is never spend-capped. It installs on Windows, macOS and Linux. Free covers 8 projects and 10 agents running at once, and Pro is $20 a month or $192 a year, with no AI allowance included on either plan. The features page lists what it does and the download page has the installers.

How we tested

We ran Claude Code 2.1.310 and codex-cli 0.164.0 on October 25, 2026, and the captures in "What we ran ourselves" are from that day. The two agent turns in the worktree capture were Claude Code sessions, since that is the command-line agent on the machine that had a sign-in, and the model behind them there is not one of the models this page compares. Every fact about either product was then read from its own documentation, pricing page or changelog on the same day, and every source is listed at the foot of this page.

No Codex session ran, because the Codex command-line tool on our machine reports itself as not logged in. Nothing on this page describes a Codex window, menu or turn that we saw ourselves, and where a fact rests on OpenAI's wording the sentence says so.

Where the copy states a price, the figure is the one the vendor's own pricing page carries on the day we read it, tax and regional pricing aside. Both products ship often, so a page a few months old is worth re-checking against the source before you act on it.

Sources

Every claim about either product rests on one of these, and the date beside each one is the day we read it.

Both products ship often. Codex retired the GPT-5.5 model for ChatGPT sign-ins on October 14, 2026, and Claude Code updates itself in the background, so check each vendor's page before you rely on a detail here.

Common questions

Is Codex free?

There is a free ChatGPT plan that includes Codex on quick coding tasks, on the GPT-6 Luna model at standard speed in the desktop app and subject to rollout. On Free and Go the model choice is limited to Luna. The paid plans, from Plus at $20 a month to Pro from $100 a month, add the larger model and more usage. An API key is a separate way to pay, at OpenAI's API prices.

Does Claude Code work without a paid plan?

Not on a Claude subscription. Anthropic's pricing page lists Claude Code as not included on the Free plan and included from Pro upward, and its documentation says most surfaces need a Claude subscription or an Anthropic Console account. The Console route bills API tokens instead of a monthly fee.

Can Claude Code and Codex be used together?

Yes. They are separate products from separate companies, signed in with separate accounts, and nothing stops you installing both. Each edits the repository in front of it, so running them in the same checkout at the same time is the one arrangement to avoid, which is what git worktrees are for.

Does Codex work inside VS Code, Cursor and JetBrains?

Yes. OpenAI ships a Codex extension for VS Code and compatible editors, with install links for VS Code, Cursor and Windsurf, and points JetBrains users at their IDE's own Codex integration and Xcode users at Apple's coding intelligence. Anthropic's own overview offers an Install for Cursor link beside its Install for VS Code link, so either agent installs into the same editors.

Which one is better at running several agents at once?

Both can put each task in its own git worktree, and the difference is what surrounds that. Claude Code adds a background session list with the claude agents command, and sessions that keep running in the cloud with your laptop shut. Codex adds worktrees in its desktop app and cloud tasks that each get their own workspace. Our captures above show that half running with two Claude Code sessions, and OpenAI's own documentation says Codex worktrees are git worktrees too.

Other tools worth a look

Claude Code and Codex are two of the ways to run coding agents, and neither is the only one. The comparison hub puts the rest of them in one table: where each one runs, how it keeps sessions apart and what it costs.

Run Claude Code and Codex sessions in one list

Omniscio installs on Windows, macOS and Linux. Each session gets its own branch and working directory when you switch isolation on, sessions needing you sort to the top, and Free covers 8 projects and 10 agents running at once.