Codex vs Claude Code: which one, and when to run both

Two command-line coding agents, two companies, two ways of keeping you in control. Here is how they differ in October 2026, what that means on Windows, and how to use both without the mess.

THE SHORT VERSION
  • Both are coding agents you run on your own machine, both start at 20 US dollars a month, and both run natively on Windows.
  • The biggest practical difference on Windows: Codex runs commands inside its own Windows sandbox. Claude Code on native Windows has no sandbox and relies on its permission prompts.
  • Codex's CLI is open source. Claude Code is not.
  • If you already pay for ChatGPT, start with Codex. If you already pay for Claude, start with Claude Code. Then try the other one on the same repo for a week.

People search for "Codex vs Claude Code" more than almost anything else about coding agents. Most of the answers they find are benchmark tables that go stale within a month, because both companies ship a new model every few weeks. So this comparison sticks to what changes slowly: how each tool works, what it costs, how it behaves on Windows, and what it is like to use every day.

Everything here was checked against the vendors' own documentation on 4 October 2026. Prices and model names move fast; the sources are listed at the end so you can check them again.

A word on who is writing. We make AigoPilot, a Windows app that runs Codex on Windows next to Claude Code, so we use both every day and have no reason to crown one of them. If you mostly want a Claude Code GUI for Windows, that page is a better start than this one.

What each one is

Codex is OpenAI's coding agent. You can use it as a command-line tool, as an extension in VS Code and similar editors, inside the ChatGPT desktop app (where you switch between ChatGPT and Codex), on the web as Codex Cloud, and on iOS. The CLI is open source under the Apache 2.0 licence and lives at github.com/openai/codex.

Claude Code is Anthropic's coding agent. It also started in the terminal and now comes as a CLI, a Code tab inside the Claude desktop app, extensions for VS Code and JetBrains, a web version, and remote control from the Claude mobile app. It is not open source.

Under the surface they do the same job. You describe a change, the agent reads your code, runs commands, edits files and asks before doing anything risky. The differences are in the details, and a few of those details matter a lot.

Side by side

CodexClaude Code
Made byOpenAIAnthropic
Where it runsCLI, IDE extension, ChatGPT desktop app, web (Codex Cloud), iOSCLI, Claude desktop app (Code tab), VS Code and JetBrains, web, mobile
Native WindowsYes, in PowerShell. Windows 11 recommended, Windows 10 1809 or later "best effort"Yes. Windows 10 1809 or later, or Windows Server 2019 or later
Sandbox on native WindowsYes, a Windows sandbox with two modesNo. Commands run unsandboxed; the sandbox works under WSL 2
Instruction fileAGENTS.mdCLAUDE.md (can also read AGENTS.md)
Cheapest plan that includes itChatGPT Plus, 20 USD a monthClaude Pro, 20 USD a month (17 USD billed yearly)
Heavier plansChatGPT Pro at 100, 200 or 500 USD a monthClaude Max at 100 or 200 USD a month
How limits workFive-hour windows, weekly limits may apply, extra credits on Plus and ProRolling five-hour window plus weekly limits, shared with the other Claude apps
API key instead of a planYes, in the CLI, SDK and IDE extension, without cloud featuresYes, through a Console account
Run without a personcodex execclaude -p and the Agent SDK
Open sourceCLI yes (Apache 2.0); IDE extension and cloud noNo

On Windows, the sandbox is the real difference

If you work on Windows, this is the part worth reading twice.

Codex runs natively in PowerShell and puts the commands it runs inside a Windows sandbox. OpenAI documents two modes. The preferred one, elevated, creates dedicated low-privilege users and firewall rules, and needs an administrator to approve the setup once. The fallback, unelevated, uses a restricted token and file permissions, and OpenAI describes it as weaker. In both modes the agent cannot write outside your working folder or reach the network without your approval. You choose the mode in config.toml:

[windows]
sandbox = "elevated"

Claude Code also runs natively on Windows, in PowerShell or CMD, and no longer needs Git for Windows. But Anthropic's docs are plain about it: on native Windows, Claude Code runs commands unsandboxed. What protects you there is its permission system, which asks before it edits files or runs commands unless you tell it not to. If you want Claude Code's sandbox on a Windows PC, run it inside WSL 2.

Neither approach is careless. A permission prompt you actually read is a real safeguard. The difference shows up when you are tired and approving things quickly, or when you want to let an agent run for an hour without watching it. On native Windows, Codex gives you a second wall. Claude Code gives you one, unless you move into WSL.

Installing them on Windows takes one line each. Codex: powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex". Claude Code: irm https://claude.ai/install.ps1 | iex. Both also have WinGet and npm options. Our Claude Code install guide covers the errors you may meet.

Models and usage limits

Codex currently recommends gpt-6.1-sol for complex coding and gpt-6-luna for smaller, focused tasks, with GPT-6 Astra above both. Claude Code defaults to Opus 5.5 on paid plans, offers Sonnet 5.5 as the faster option, and lists Fable 5.1 as its most capable model, which you have to pick by hand.

Both companies publish benchmark scores for their newest models, and both pick the benchmarks. We would not choose between them on those numbers. A week of real work in your own repository tells you more.

Limits are where the plans feel different in practice. On ChatGPT Plus, OpenAI gives a range of messages per five-hour window for each model, says weekly limits may also apply, and lets you buy credits when you run out. The Pro plans currently have no five-hour limit. On Claude, every paid plan has a rolling five-hour window with weekly limits on top, and that allowance is shared with the Claude chat apps. If you also use Claude for writing or research, your coding sessions draw from the same pool.

Day to day

Instruction files

Codex reads AGENTS.md in your project, with an optional AGENTS.override.md. Claude Code reads CLAUDE.md, and its docs cover reading AGENTS.md as well. If you plan to use both, keep the shared rules in AGENTS.md so you write them once.

Asking for permission

Codex separates two questions: what the agent may touch (sandbox modes read-only, workspace-write and danger-full-access) and when it must ask you (approval policies such as on-request and never). Its "Auto" preset combines workspace writes with asking on request.

Claude Code has one set of permission modes: the default manual mode, acceptEdits, plan, auto, dontAsk and bypassPermissions. Plan mode is worth knowing about. The agent reads and proposes, and changes nothing until you approve the plan.

Extending them

The feature lists have nearly converged. Both support MCP servers, hooks that run your own scripts on events, subagents, skills and plugins. Both can run without a person at the keyboard for scripts and CI. Both review pull requests on GitHub. A year ago this section would have had a clear winner. Today it mostly doesn't.

Which one should you pick?

Start with Codex if you already pay for ChatGPT, you work on native Windows and want a sandbox without setting up WSL, or you care that the CLI's code is open.

Start with Claude Code if you already pay for Claude, you like working in plan mode before letting an agent touch anything, or you want Anthropic's own desktop app with its Code tab.

If you pay for neither, take one month of each at 20 dollars and use them on the same real task. That is 40 dollars and a far better answer than any comparison article, this one included.

You do not have to choose

A lot of people who try both keep both. The two agents make different mistakes, so one is a useful reviewer for the other. A common setup looks like this:

  1. Keep the shared project rules in AGENTS.md, so both agents follow the same conventions.
  2. Give each agent its own branch or git worktree. Two agents editing the same files at the same time is how afternoons get lost.
  3. Let one build and the other review. Ask Codex to review the diff Claude Code produced, or the other way round.
  4. When one hits its usage limit, carry on with the other instead of waiting for the window to reset.

The cost of this setup is attention. Two agents in two terminals means two places to check, and a session that has been waiting for your permission for twenty minutes looks exactly like one that is still working. That is the problem tools that put every session in one window try to solve, ours included: see Codex on Windows.

Questions people ask

Is Codex better than Claude Code?

Neither wins everywhere. Codex has a native Windows sandbox and an open-source CLI. Claude Code has a larger set of permission modes and its own desktop app with a Code tab. Most people pick by which subscription they already pay for, then add the other for second opinions.

Can I use Codex and Claude Code on the same project?

Yes. They read different instruction files (AGENTS.md and CLAUDE.md), and Claude Code can also read AGENTS.md, so one file of shared rules works for both. Give each agent its own branch or worktree so they do not edit the same files at once.

Do Codex and Claude Code run natively on Windows?

Yes, both run natively in PowerShell. Codex runs commands inside a Windows sandbox. Claude Code on native Windows runs commands without a sandbox and relies on its permission prompts; its sandbox works under WSL 2.

How much do Codex and Claude Code cost?

Both start at 20 US dollars a month: ChatGPT Plus for Codex, Claude Pro for Claude Code. Heavier plans cost more: ChatGPT Pro from 100 dollars, Claude Max at 100 or 200 dollars. Both can also run on a pay-as-you-go API key.

Sources