Skip to main content

Claude Code vs. Codex: My In-Depth Test

Claude Code and OpenAI Codex fact-checked. Separate CLI and desktop app reviews, local and cloud execution, models, prices, changelogs, and hands-on tests.

FHFinn Hillebrandt
AI Programming
Claude Code vs. Codex: My In-Depth Test
Links marked with * are affiliate links. If a purchase is made through such links, we receive a commission.

Let's clear up the biggest misconception first. OpenAI Codex is not a cloud-only coding agent. The Codex CLI works inside your local repository, reads and edits local files, and runs the tools installed on your machine.

That misconception is exactly where most comparisons fall apart. They lump Codex CLI, Codex Cloud, and the ChatGPT desktop app together, even though these are three different products. So for this article, I installed both CLIs on the same Mac and tested them hands-on instead of just comparing feature lists.

TL;DRKey Takeaways
  • CLI vs. CLI: Both work locally. Claude Code has the denser interactive interface, while Codex has the clearer sandbox model and a strong automation path through codex exec
  • Desktop app vs. desktop app: Claude offers Local, Cloud, SSH, and WSL. ChatGPT offers Local, Worktree, and Cloud for Codex. Both apps can work locally and remotely
  • My verdict: Claude Code fits a terminal-centered workflow better. Codex is more versatile if you want to combine a CLI, GUI, worktrees, cloud tasks, and several parallel threads

1. Four Products You Need to Separate

A fair comparison starts with the correct product boundary. This is not a simple fight between local and cloud. You are looking at four distinct surfaces.

Claude Code CLI
Where does the work run?
Local repository, with a separate cloud start option
Strength
Terminal, scripts, CI, and Remote Control
Where does the work run?
Local repository, with optional cloud subcommands
Strength
Terminal, codex exec, review, and automation
Claude desktop app, Code tab
Where does the work run?
Local, Cloud, SSH, or WSL
Strength
GUI, parallel sessions, worktrees, and preview
ChatGPT desktop app, Codex mode
Where does the work run?
Local, Worktree, or Cloud
Strength
GUI, parallel threads, diff, terminal, and browser

The gradually.ai popularity index shows how much demand each tool sees. It lists Codex CLI and the Codex app separately, while Claude Code counts as one product across all surfaces. It combines Google search volume, usage data such as downloads and installs, and news mentions into a score from 0 to 100.

Popularity index from 0 to 100, higher is more popular · As of November 16, 2026
Claude Code
94
Codex CLI
85
Codex app
72
Source: Gradually popularity index
gradually.ai

2. How I Tested Both Tools

I ran the hands-on test on August 24, 2026, using an Apple Silicon Mac with macOS 26.6.2 and 128 GB of memory. The installed software was Claude Code CLI 2.1.234, Claude Desktop 1.34493.1 with bundled Claude Code 2.1.237, Codex CLI 0.149.0-alpha.4.1, and ChatGPT Desktop 26.818.41509.

For the CLI test, I created two copies of the same tiny JavaScript app. A duration parser had two bugs. Six tests covered the behavior, and two failed at the start. Both agents received the same task. They could edit source code and run tests, but they could not change tests, install packages, or create commits.

Identical test prompt
Find and fix the bug in this repository.
Run the tests and keep the change minimal.
Do not install dependencies, edit tests, or commit.

One controlled run on August 24, 2026. The models and reasoning levels differed, so this is not a performance benchmark.

Installed version
Claude Code
CLI 2.1.234
Codex
CLI 0.149.0-alpha.4.1
Model and mode
Claude Code
Fable 5, High
Codex
gpt-5.6-sol, reasoning none
Task
Claude Code
Find and fix a bug in a small JavaScript parser
Codex
Same task in a separate copy
Result
Claude Code
6/6 tests, only source file changed
Codex
6/6 tests, only source file changed
Duration
Claude Code
83.50 seconds
Codex
36.12 seconds
Observation
Claude Code
20 turns, repeated permission prompts in safe mode
Codex
34,053 tokens, then an autonomous run in the workspace sandbox

Both tools found the correct cause, changed only the source file, and passed all 6/6 tests. Codex was faster in this run. However, Fable 5 ran at high reasoning, while Sol ran without reasoning.

3. CLI vs. CLI

The Codex CLI works locally, as OpenAI's official CLI documentation states. It inspects files, edits them, and runs tools installed on your machine. Claude Code does the same. The real differences are interface design, automation, and security controls.

Columns:
|
FeatureClaude CodeOpenAI Codex
Basics(6 entries)
ManufacturerAnthropicOpenAI
Release DateFebruary 2025April 2025
Open SourceNoApache 2.0
Primary InterfaceTerminal (CLI)Terminal (CLI)
InstallationNative installer, Homebrew, WinGetHomebrew, npm, system packages
Operating SystemsMac/Linux/WinMac/Linux/Win
Pricing & Limits(6 entries)
Base Price$20/mo (Pro)$20/mo (Plus)
Premium Tier$100-200/mo (Max)$100-200/mo (Pro)
Free TierNoLimited
API Input Cost$1-10/1M$0.20-5/1M
API Output Cost$5-50/1M$1.20-30/1M
Prompt CachingYesYes
Models & Context(9 entries)
Default SelectionClaude Opus 5 (1M)gpt-5.6-sol
Highest CapabilityClaude Fable 5 (best)gpt-5.6-sol
Fast ModelClaude Haiku 4.5gpt-5.6-luna
Preview ModelNogpt-5.3-codex-spark
Model Selection/model/model
Default Selection Context1M (Fable/Opus/Sonnet)1.05M (GPT-5.6)
Max Context1M Token1.05M Token
Output Limit128K Token128K Token
Reasoning ModeEffort / adaptiveLow-Max
Standards & Configuration(5 entries)
Config FileCLAUDE.mdAGENTS.md
MCP SupportFullFull
Skills/PluginsSkills/PluginsSkills/Plugins
Custom InstructionsRules & settingsRules & settings
Project ContextAutomaticAutomatic
Integration & Surfaces(8 entries)
Git IntegrationGit + worktreesGit + worktrees
VS CodeExtensionExtension
JetBrains IDEsPluginTerminal
Cursor SupportVS Code-compatibleVS Code-compatible
NeovimTerminalTerminal
Desktop AppSeparate Claude appInside ChatGPT app
Web/CloudSeparate cloud workflowSeparate cloud workflow
API AccessFullFull
Features & Capabilities(11 entries)
File OperationsRead/WriteRead/Write
Shell CommandsLocal shellLocal shell
Code GenerationYesYes
RefactoringYesYes
DebuggingYesYes
Test GenerationYesYes
Code Review/reviewcodex review
DocumentationYesYes
Image InputScreenshotsVision
Web SearchYesYes
Codebase AnalysisFullFull
Autonomy & Agents(8 entries)
Autonomous WorkYesYes
SubagentsNativeNative
Parallel AgentsYesYes
Task PlanningAutomaticAutomatic
CheckpointsRewindUndo / Git diff
Context Compression/compactAutomatic
Session Continuation-c / -rresume
Headless/Batch-p Flagcodex exec
Security & Privacy(4 entries)
Local ExecutionYesYes
Permissions SystemTools + OS sandboxOS sandbox + approvals
Enterprise OptionsYesEnterprise
Data TrainingPlan-dependentPlan-dependent
Hands-on Test & Releases(3 entries)
Local Control Test6/6 tests6/6 tests
Control Test Duration83.50 s (Fable 5, High)36.12 s (Sol, None)
Stable Releases in 90 Days7829
Positive
Limited
Not available
Special

3.1 Interactive Use

Claude Code feels like a dense terminal application. Slash commands control models, permissions, context, worktrees, agents, Remote Control, and many convenience features. It shows plans, tool calls, and questions clearly, but strict permissions can trigger a lot of confirmations.

Codex is interactive too, but it exposes more features as standalone subcommands. codex exec handles noninteractive runs, codex review performs reviews, and codex app opens the desktop app. This structure is easy to understand in scripts and CI.

Local and noninteractive starts
# Claude Code, local and interactive
claude

# Claude Code, noninteractive
claude -p "Run the tests and explain every failure" --output-format json

# Codex, local and interactive
codex

# Codex, noninteractive
codex exec "Run the tests and explain every failure"

3.2 Sandbox and Permissions

Claude separates tool permissions from its operating-system sandbox. Rules can allow or block individual tools and commands. Hooks add your own checks. The sandbox then limits the child processes launched by an approved shell command. Anthropic says this sandbox is unavailable on native Windows, but it works under WSL2.

Codex documents three sandbox levels. read-only permits reading, workspace-write adds edits inside the workspace, and danger-full-access removes the boundary. A separate approval policy determines when the agent must ask. The combination of workspace-write and on-request is a sensible starting point for normal local work.

3.3 Extensions and Project Rules

Both support MCP, skills, hooks, subagents, project instructions, and image input. Claude usually reads CLAUDE.md, while Codex reads AGENTS.md. Codex CLI, desktop, and IDE share config.toml. Claude shares settings, skills, hooks, and MCP between its CLI and Code tab.

The important distinction for parallel agents is not “Claude is local and Codex is cloud.” Both can launch subagents locally. Both also provide cloud workflows. Subagents consume additional tokens on either platform, so you should use them deliberately.

4. Desktop App vs. Desktop App

The desktop side causes just as much confusion. The “Codex desktop app” is now the Codex mode inside ChatGPT. Claude Code lives in the Code tab of the Claude app. Both are graphical workspaces with their own workflows, not prettier terminal windows.

Product
Claude Desktop
Code tab in the Claude desktop app
ChatGPT Desktop with Codex
Codex mode in the ChatGPT desktop app
Local work
Claude Desktop
Local on your own computer
ChatGPT Desktop with Codex
Local in the project folder
Remote machine you control
Claude Desktop
SSH connection
ChatGPT Desktop with Codex
No dedicated SSH mode documented
Isolated local work
Claude Desktop
Worktree toggle per session, off by default
ChatGPT Desktop with Codex
Worktree mode with handoff
Cloud execution
Claude Desktop
Selectable cloud environment
ChatGPT Desktop with Codex
Isolated cloud container
Additional environment
Claude Desktop
WSL on Windows
ChatGPT Desktop with Codex
Native Windows or WSL2
Interface
Claude Desktop
Chats, files, diff, terminal, and app preview
ChatGPT Desktop with Codex
Chats, files, diff, terminal, browser, and tasks
Parallel work
Claude Desktop
Multiple sessions and Dynamic Workflows
ChatGPT Desktop with Codex
Multiple threads and subagents
Configuration
Claude Desktop
Shares CLAUDE.md, skills, hooks, and MCP with the CLI
ChatGPT Desktop with Codex
Shares config.toml, AGENTS.md, skills, hooks, and MCP with the CLI
Remote
Claude Desktop
Remote Control operates the local CLI
ChatGPT Desktop with Codex
ChatGPT Remote operates the connected computer
Operating systems
Claude Desktop
macOS, Windows, Linux beta
ChatGPT Desktop with Codex
macOS, Windows, Linux

4.1 Claude Desktop in Daily Work

According to the Claude desktop documentation, the Code tab opens folders, shows files and diffs, includes a terminal, and can preview an app. In a Git repository, you can turn on the Worktree toggle before you start. The session then runs in its own Git worktree, so several tasks don't modify the same checkout.

Worktree is off by default. Claude then works directly in the project folder.

Claude provides four execution targets. Local runs on your Mac or PC, SSH runs on a remote machine you control, WSL runs inside the Windows Linux environment, and Cloud uses Anthropic infrastructure. Remote Control is separate. It lets another device operate a running local CLI session, but it does not silently move execution to the cloud.

4.2 ChatGPT Desktop with Codex in Daily Work

The ChatGPT desktop app opens projects and Codex chats, displays files, diffs, and terminal output, and can use browser and computer tools. Of the three Codex modes, Local works in the selected project folder. Worktree mode creates an isolated Git worktree and supports handoff between Local and Worktree.

Cloud starts a configured container with a checkout, setup script, diff, and pull-request option.

Worktree mode requires Git. New worktrees begin on a detached HEAD by default. You create a branch deliberately before the work can be pushed permanently. The behavior is technically clean, but it is not self-explanatory for beginners.

4.3 Which Desktop App Is Easier to Use?

ChatGPT feels more approachable if you already know its chat interface and want threads, browser work, and scheduled tasks in one place. Claude feels more focused on the coding loop of task, file diff, terminal, and preview.

Isolated worktrees are the biggest productivity gain in both apps when you run several local tasks at once. Claude needs the Worktree toggle, and Codex needs Worktree mode. In both apps, isolation is a deliberate choice per task.

Neither app removes the need for basic Git knowledge. Before you start, know whether the task runs in your folder, a worktree, or a cloud checkout. That decision matters more than the color of the interface.

5. Every Model Available Right Now

I did not rely on marketing pages alone. I opened the model pickers in both locally installed CLIs. The API prices below are per 1 million input and output tokens.

The tables show each model's technical maximum. The context window available through a Claude or ChatGPT plan can be smaller because of the plan, interface, and context reserved for tools.

5.1 Claude Code Models

Sources: local Claude Code picker and official Anthropic model overview, checked August 24, 2026, supplemented with Claude Opus 5.5, Sonnet 5.5, Fable 5.1, and Haiku 5.5 from Anthropic's official model overview, retrieved October 31, 2026, and with Fable 5.2 from Anthropic's documentation, retrieved November 14, 2026.

Role in the picker
Highest-capability option in the test, now a legacy model
Released
Jun 9, 2026
Context
1M
Max output
128,000
API input / output
$10 / $50
Claude Opus 5
Role in the picker
Strong model for complex work, now a legacy model
Released
Jul 24, 2026
Context
1M
Max output
128,000
API input / output
$5 / $25
Claude Sonnet 5
Role in the picker
Balanced everyday model, now a legacy model
Released
Jun 30, 2026
Context
1M
Max output
128,000
API input / output
$2 / $10
Claude Haiku 4.5
Role in the picker
Fastest option in the test, now a legacy model
Released
Oct 15, 2025
Context
200,000
Max output
64,000
API input / output
$1 / $5
Claude Opus 5.5
Role in the picker
Stronger, less expensive successor to Opus 5
Released
Sep 22, 2026
Context
1M
Max output
128,000
API input / output
$4 / $20
Claude Sonnet 5.5
Role in the picker
Faster, lower-cost complement to Opus 5.5 and successor to Sonnet 5
Released
Sep 28, 2026
Context
1M
Max output
128,000
API input / output
$2 / $10
Claude Fable 5.1
Role in the picker
Successor to Fable 5 for demanding reasoning and long agentic runs
Released
Sep 1, 2026
Context
1M
Max output
128,000
API input / output
$10 / $50
Claude Fable 5.2
Role in the picker
Less expensive successor to Fable 5.1, fable alias from Claude Code 2.1.321
Released
Nov 9, 2026
Context
1M
Max output
128,000
API input / output
$8 / $40
Claude Haiku 5.5
Role in the picker
Fastest current model, haiku alias from Claude Code 2.1.293
Released
Oct 7, 2026
Context
1M
Max output
128,000
API input / output
from $0.10 / from $0.50

The Default entry in my picker recommended Opus 5 with a 1 million token context window. Fable 5 is the highest-capability option, but it is also the most expensive at $10 input and $50 output.

Opus 5 cuts those prices in half and remains strong for difficult work. Sonnet 5 was the practical all-rounder. Haiku 4.5 is the least expensive, but its context is 200,000 tokens and its maximum output is 64,000.

On September 22, 2026, Anthropic released Claude Opus 5.5, after my picker test. According to Anthropic's official model overview, it costs $4 input and $20 output per 1 million tokens, less than Opus 5, which Anthropic now lists as a legacy model that is still available.

Unlike Opus 5, thinking cannot be disabled on Opus 5.5, and the default effort dropped from high to medium. Anthropic also mentions a new fast mode for Opus 5.5 that is available in Claude Code.

On September 28, 2026, Anthropic also released Claude Sonnet 5.5. It costs $2 input and $10 output per 1 million tokens, exactly as much as Sonnet 5. According to the Claude Code documentation, the sonnet alias points to Sonnet 5.5 from version 2.1.284, but the default remains Opus 5.5.

Anthropic describes Sonnet 5.5 as a faster, lower-cost complement to Opus 5.5. On Anthropic's own Terminal-Bench 4.0 results, it even lands ahead of Opus 5.5. For complex, open-ended work that requires sustained judgment, Anthropic still sees Opus 5.5 as clearly stronger. Thinking cannot be disabled on Sonnet 5.5 in Claude Code either, and the default effort is medium.

Claude Haiku 5.5 followed on October 7, 2026. It costs from $0.10 input and $0.50 output per 1 million tokens, or $0.50 and $2.50 for prompts over 100,000 tokens. Unlike Haiku 4.5, it has a 1 million token context window and 128,000 output tokens. Anthropic recommends Claude Code 2.1.293 or later for it. Fable 5.1 has succeeded Fable 5 at the same price since September 1, 2026. Fable 5.2 followed on November 9, 2026, at $8 input and $40 output per 1 million tokens. It requires Claude Code 2.1.321 or later.

The Terminal-Bench 4.0 scores of the Anthropic models side by side:

Sonnet 5.5 (system card)
70.6%
Opus 5.5 (xhigh)
66.4%
Fable 5.1
55.8%
Opus 5
52.3%
Anthropic, vendor-reported
gradually.ai

5.2 Codex Models

Sources: local Codex picker and official OpenAI model pages, checked August 24, 2026, supplemented with GPT-6 Sol, GPT-6 Luna, GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, and the retirements from OpenAI's official model documentation, retrieved October 31, 2026.

Role in the picker
Former flagship for difficult coding work
Knowledge cutoff
Feb 16, 2026
Context
1.05M
Max output
128,000
API input / output
$4 / $20
Note
Previous generation, no longer in the Codex model overview
gpt-5.6-terra
Role in the picker
Former everyday option
Knowledge cutoff
Feb 16, 2026
Context
1.05M
Max output
128,000
API input / output
$2 / $12
Note
Previous generation, no longer in the Codex model overview
gpt-5.6-luna
Role in the picker
Former low-cost model for routine work
Knowledge cutoff
Feb 16, 2026
Context
1.05M
Max output
128,000
API input / output
$0.20 / $1.20
Note
Previous generation, no longer in the Codex model overview
gpt-5.5
Role in the picker
Powerful previous-generation model
Knowledge cutoff
Dec 1, 2025
Context
1.05M
Max output
128,000
API input / output
$5 / $30
Note
ChatGPT access ended October 14, 2026
gpt-5.4
Role in the picker
Previous-generation model
Knowledge cutoff
Aug 31, 2025
Context
1.05M
Max output
128,000
API input / output
$2.50 / $15
Note
ChatGPT access ended August 31, 2026
gpt-5.4-mini
Role in the picker
Smaller previous-generation model
Knowledge cutoff
Aug 31, 2025
Context
400,000
Max output
128,000
API input / output
$0.75 / $4.50
Note
ChatGPT access ended August 31, 2026
gpt-5.3-codex-spark
Role in the picker
Very fast text model in research preview
Knowledge cutoff
Not published
Context
Not published
Max output
Not published
API input / output
No API price
Note
Retired September 14, 2026
gpt-6-sol
Role in the picker
New model for complex, agentic coding work
Knowledge cutoff
Apr 20, 2026
Context
1.05M
Max output
128,000
API input / output
$2 / $10
Note
In Codex since Sep 22, 2026, OpenAI now points to gpt-6.1-sol
gpt-6-luna
Role in the picker
Fast and inexpensive for high-volume routine work
Knowledge cutoff
May 18, 2026
Context
1.05M
Max output
128,000
API input / output
$0.10 / $0.50
Note
Reasoning up to Max, in Codex since Sep 22, 2026
gpt-6-astra
Role in the picker
Most expensive GPT-6 model for the hardest tasks
Knowledge cutoff
Apr 30, 2026
Context
1.05M
Max output
128,000
API input / output
$10 / $50
Note
Reasoning up to Max
gpt-6.1-sol
Role in the picker
New model for agentic coding and computer use
Knowledge cutoff
Apr 30, 2026
Context
1.05M
Max output
128,000
API input / output
$2 / $10
Note
Reasoning up to Max, recommended choice for Plus through Edu
gpt-6.1-terra
Role in the picker
Balanced everyday model of the 6.1 series
Knowledge cutoff
Jun 1, 2026
Context
1.05M
Max output
128,000
API input / output
$1 / $5
Note
In Codex since Oct 26, 2026, requires CLI 0.159.0

The GPT-5.6 family was the generation before GPT-6. Sol was built for difficult work, Terra covered most everyday tasks, and Luna handled fast, repeatable jobs. OpenAI's current Codex model overview lists only GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, and GPT-6 Luna. Free and Go users should pick GPT-6 Luna in the desktop app when available. Spark was a text-only research preview for ChatGPT Pro, which OpenAI retired on September 14, 2026.

GPT-5.4 and GPT-5.4-mini still appeared in the picker on the test date. OpenAI removed them from Codex for ChatGPT-authenticated users on August 31, 2026, and GPT-5.5 followed on October 14, 2026. The model documentation says API-key authentication is unaffected.

On September 22, 2026, OpenAI released GPT-6 Sol and GPT-6 Luna, available in Codex starting that day according to OpenAI's own announcement. According to OpenAI's API model pages for GPT-6 Sol and GPT-6 Luna, Sol costs $2 input and $10 output per 1 million tokens, and Luna costs $0.10 input and $0.50 output. That makes both at least 50% cheaper than their GPT-5.6 predecessors.

OpenAI positions Sol for complex, agentic coding work and Luna for fast, routine tasks. On OpenAI's own OSWorld 2.0 benchmark, Sol at xhigh effort scores 60.5%, similar to Claude Opus 5 at medium effort with 60.3%, but at roughly 80% lower cost per task.

GPT-6 Astra, OpenAI's flagship released on September 3, remains its most capable model by its own account. OpenAI describes GPT-6.1 Sol as offering near-Astra performance at a lower cost.

On October 26, 2026, GPT-6.1 Terra arrived in ChatGPT Work and Codex for Plus, Pro, Business, Enterprise, and Edu. According to its API model page, it costs $1 input and $5 output per 1 million tokens. According to the Codex model overview, the Codex CLI requires version 0.159.0 or later.

5.3 Which Model Is Better?

Anthropic and OpenAI publish their benchmark scores with different agent harnesses, tools, limits, and prompting setups.

Artificial Analysis offers an independent comparison of both tools running their strongest models. Its Coding Agent Index combines three agent benchmarks. Claude Code with Opus 5.5 comes out ahead, while Codex with GPT-6 Astra costs less per task.

Claude Code (Opus 5.5, Max)
62
Codex (GPT-6 Astra, Max)
55
Artificial Analysis, Coding Agent Index
gradually.ai

Your workflow should still drive the choice. Fable 5.2 and GPT-6 Astra are the quality options. Opus 5.5 and GPT-6.1 Sol are the strong all-rounders. Sonnet 5.5 and GPT-6.1 Terra are the balanced models. Haiku 5.5 and GPT-6 Luna are the fast, inexpensive models. Test your own repositories with identical tasks, permissions, and acceptance tests.

6. Changelogs and Development Speed

I counted the official GitHub releases of Claude Code and Codex through October 31, 2026. For Codex, I counted stable releases matching rust-vX.Y.Z and excluded drafts and prereleases. Claude Code ships far more frequently.

Counted from official GitHub releases with UTC timestamps through October 31, 2026.

30 days
Claude Code
25 releases, one every 1.20 days
Codex CLI
8 releases, one every 3.8 days
90 days
Claude Code
80 releases, one every 1.13 days
Codex CLI
36 releases, one every 2.5 days
180 days
Claude Code
157 releases, one every 1.15 days
Codex CLI
65 releases, one every 2.8 days

Claude Code 2.1.316 from October 31 was the latest Claude release in the measurement. According to OpenAI's Codex changelog, Codex 0.166.0 arrived on October 29. Claude averages roughly one release every 1.1 to 1.2 days across all three windows. Codex averages one stable release every 2.5 to 4 days.

Codex often bundles several changes into one stable release and also publishes alpha and prerelease builds that I deliberately excluded. Claude users get features quickly, but teams also need to update documentation and policies more often.

7. Requirements and Installation

CLI systems
Claude Code
macOS 13+, Windows 10 1809+ or Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine 3.19+
Codex
macOS, Linux, and Windows, with no published minimum version
Architecture
Claude Code
x64 or ARM64
Codex
x64 or ARM64, depending on the system package
Memory
Claude Code
At least 4 GB according to Anthropic
Codex
No official minimum published
Authentication
Claude Code
Claude Pro, Max, Ultra, Team, Enterprise, Console, or a supported cloud provider
Codex
ChatGPT or API key, with ChatGPT login required for cloud
Desktop
Claude Code
macOS, Windows, Linux beta
Codex
macOS, Windows, Linux
Internet
Claude Code
Required
Codex
Required
Official installation routes
# Claude Code native installer for macOS and Linux
curl -fsSL https://claude.ai/install.sh | bash

# Codex through Homebrew
brew install --cask codex

# Both providers also publish npm packages.
# Always check the current official installation docs first.

The current installation commands are in the Claude Code installation guide or Codex CLI documentation.

Local models work without Anthropic or OpenAI servers. Ollama documents how to connect local models to Claude Code and to Codex, and recommends a context window of at least 64,000 tokens. This is a third-party configuration.

8. Prices and Usage Limits

According to the Claude pricing page, Claude Code is included in Claude Pro at $20 per month. Max costs $100 per month, and Ultra costs $200. Team Standard costs $25 monthly or $20 with annual billing, while Team Premium costs $125 monthly or $100 with annual billing.

OpenAI's current Codex pricing page includes Codex in ChatGPT Free, Go at $8, Plus at $20, Pro at $100, $200, or $500, and Business at $25 monthly or $20 with annual billing. Ultrafast mode is limited to the $500 Pro tier.

API-key authentication uses token billing on both platforms. Those are the numbers in the model tables. You cannot reliably convert a subscription limit into a fixed token count. Claims such as “150 messages every five hours” are useless without a current, plan-specific source.

9. Privacy and Security

Both tools execute local commands, but they send the required code and context to a model provider. A sandbox protects your file system and network from the agent, as OpenAI's Codex security documentation explains. It does not prevent approved context from being transmitted for inference.

For Claude Free, Pro, and Max, model-improvement use depends on the user's privacy setting, according to Anthropic's Claude Code data policy. Team, Enterprise, and API data are not used for training by default. OpenAI also separates consumer and business data policies.

  • Start unknown repositories with read access or a workspace sandbox.
  • Do not put secrets in project files, prompts, or screenshots.
  • Trust project rules, hooks, skills, and MCP servers only after review.
  • Use full permissions only inside an isolated VM or disposable container.
  • Review the diff and run tests yourself before you commit or push.

10. How popular are Claude Code and Codex compared with other coding agents?

Claude Code and Codex are not the only coding agents. The popularity index shows how many developers search for and use them, and where they sit in the field.

AI harnesses are the tools in which a language model works as a coding agent, for example in the terminal, the IDE or the cloud. In the gradually.ai popularity index, Claude Code (94 points), Codex CLI (85 points) and Cursor (83 points) lead. The index combines search demand, GitHub and package data and mentions in tech media; 37 harnesses have a value.

Claude Code is at rank 1 (94 points). Codex CLI is at rank 2 (85 points).

In the EU, Claude Code leads, in Germany, Claude Code leads. Use the switch above the chart to change between world, EU and Germany.

The most popular AI harnesses

Popularity index from 0 to 100, higher is more popular.

20 of 37 models

Claude Code94
Codex CLI85
Cursor83
Google Antigravity81
Zed78
GitHub Copilot76
Pi76
OpenCode73
Devin73
Qwen Code72
Codex app72
Gemini CLI70
Kilo Code67
Cline66
Devin Desktop (formerly Windsurf)65
CodeBuddy65
TRAE64
OpenHands64
Warp60
Amp60

As of November 16, 2026 · Source: gradually.ai popularity index

11. Who leads on coding benchmarks, Claude Code or Codex?

Here you can see how Claude Code and Codex CLI score against each other in the same independent tests.

Independent evaluators such as Vals AI test coding agents on fixed tasks. 8 tests compare at least two harnesses. The leaders are Claude Code (4 times), Codex CLI (2 times), Grok Build (1 times) and Muse Code (1 times).

Every value belongs to the combination of harness, model and reasoning level, not to the harness alone. The model behind each result is shown under its bar.

Terminal-Bench 4.0Tasks in reproducible terminal environments. The agent, its tools and the reasoning level are part of the result.
Claude CodeClaude Opus 5.5 · max64.9%
Claude CodeClaude Sonnet 5.5 · max61.8%
Codex CLIGPT-6.1 Sol · max58.2%
Claude CodeClaude Fable 5.1 · max57.9%
Claude CodeClaude Opus 5 · max51.8%
Claude CodeClaude Fable 5 · max44.6%
Codex CLIGPT-5.6 Sol · max37.3%
Claude CodeClaude Opus 4.8 · max23.6%
Codex CLIGPT-5.6 Terra · max21.5%
Grok BuildGrok 4.6 · high20.3%
Muse CodeMuse Spark 1.3 · xhigh14.6%
Claude CodeClaude Sonnet 5 · max12.4%

Source: Terminal-Bench, retrieved October 15, 2026

SWE-bench Verified500 validated tasks from real GitHub issues. It measures the model with its harness and tools.
Claude CodeClaude Opus 4.885.8%
CursorComposer 2.579.6%
Codex CLIGPT-5.576.4%
Factory DroidGPT-5.576.2%

Source: Vals AI, retrieved November 7, 2026

Vibe Code Bench v1.1Can the agent build a web application from scratch? The finished application is scored.
Claude CodeClaude Opus 4.877.5%
Factory DroidGPT-5.567.4%
Codex CLIGPT-5.558.2%
Claude CodeClaude Sonnet 4.655.8%
CursorComposer 2.549.6%
Codex CLIGPT-5.448.5%
Grok BuildGrok Build 0.113.3%
DevinSWE-1.6 Fast7.2%

Source: Vals AI, retrieved November 7, 2026

SWE-Marathon v1.1Long software tasks over many hours, checked with the project's own tests.
Muse CodeMuse Wonder Full · max53.1%
Muse CodeMuse Wonder · max52.5%
Claude CodeClaude Sonnet 5.5 · max51.3%
Claude CodeKimi K3 · max48.1%
Claude CodeClaude Opus 5.5 · max46.3%
Claude CodeClaude Fable 5.1 · max45.6%
OpenCodeGemini 3.7 Flash · max22.5%

Source: SWE-Marathon, retrieved October 15, 2026

SWE-Marathon v1.020 multi-hour repository tasks, solved or not solved (pass@1).
Grok BuildGrok 4.529.0%
Claude CodeClaude Opus 4.826.0%
Claude CodeClaude Fable 524.0%
Claude CodeClaude Opus 4.716.0%
Codex CLIGPT-5.512.0%
Gemini CLIGemini 3.5 Flash7.0%

Source: SWE-Marathon, retrieved August 9, 2026

TUA-Bench120 real terminal tasks covering documents, email, web research and technical work (pass@1).
Claude CodeClaude Opus 4.8 · max58.8%
Codex CLIGPT-5.5 · xhigh57.7%

Source: TUA-Bench, retrieved August 9, 2026

CUA-benchSix video games played with only a keyboard and a mouse. Half of them are held out.
Codex CLIGPT-6 Astra · max19.2%
Claude CodeClaude Opus 5.5 · max14.0%
Claude CodeClaude Fable 5.1 · max13.2%
Claude CodeClaude Opus 5 · max9.0%
Codex CLIGPT-5.6 Sol · max8.3%
Muse CodeMuse Wonder · max7.2%
Muse CodeMuse Spark 1.3 Max · max5.8%
Google AntigravityGemini 4 Argon · high4.8%

Source: Vals AI, retrieved November 7, 2026

Robo-benchControlling a robot arm and a humanoid in a physics simulation, from motor commands and camera images alone.
Codex CLIGPT-6.1 Sol · max28.3%
Codex CLIGPT-6 Astra · max23.3%
Claude CodeClaude Opus 5.5 · max14.6%
Muse CodeMuse Wonder Full · max10.4%
Claude CodeClaude Fable 5.1 · max5.8%
Google AntigravityGemini 4 Argon · high0.8%
Grok BuildGrok 4.7 · xhigh0.2%

Source: Vals AI, retrieved November 7, 2026

12. My Recommendation

I would choose Claude Code for a terminal-centered workflow. Its interactive surface, extensive slash commands, precise tool rules, and rapid release cadence make it an excellent daily companion. The Claude desktop app complements that workflow well, especially through optional worktrees and app preview.

I would choose Codex when I want to use terminal and GUI equally, organize many threads in parallel, or switch deliberately between Local, Worktree, and Cloud. The Codex CLI is not an accessory for the cloud. It is a complete local agent with strong automation and a transparent sandbox model.

If you already pay for ChatGPT Plus, Pro, or a Claude plan, start with the included tool. Then turn five real tasks from your repository into a small eval. Only add a second subscription when the other tool solves those tasks better, repeatedly.

To understand how Anthropic's chat app differs from its coding agent, read Claude vs. Claude Code. The chatbots head to head are in ChatGPT vs. Claude, and the user numbers for both tools are in Claude Code Statistics and Codex Statistics.

Frequently Asked Questions

Neither is better for every workflow. Codex is more versatile if you want to combine a CLI, GUI, worktrees, cloud tasks, and parallel threads. Claude Code fits a terminal-centered workflow with a dense interactive interface and granular permissions.

No. The Codex CLI works directly in your local project folder and uses the tools installed on your machine. Local mode in the ChatGPT desktop app also runs on your computer. Cloud is a separate, optional execution environment.

Claude Code revolves around a dense interactive session with granular tool permissions. Codex combines its interactive interface with standalone commands such as codex exec and an explicit operating-system sandbox model. Functionally they are similar: both read and edit local files, run commands, and support MCP, skills, hooks, and subagents.

In my single controlled run, Codex was faster: 36.12 seconds versus 83.50 seconds for Claude Code. That is not universal, since the models and reasoning levels differed.

The opus, sonnet, and haiku aliases point to Opus 5.5, Sonnet 5.5, and Haiku 5.5 on the Anthropic API, and the fable alias points to Fable 5.2. Run `/model` to see the models available to your account.

OpenAI's model overview for Work and Codex lists four current models: GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, and GPT-6 Luna. Free and Go get GPT-6 Luna in the desktop app. Plus, Pro, Business, Enterprise, and Edu get GPT-6.1 Sol; in Enterprise and Edu, an admin must enable it first. GPT-6.1 Terra has been available in Plus, Pro, Business, Enterprise, and Edu since October 26, 2026.

Codex yes, Claude Code no. OpenAI includes Codex in every ChatGPT plan, including Free, with models and limits varying by plan. Claude Code is included with Pro, Max, Ultra, Team, and Enterprise, but not the free Claude plan. A local model through Ollama can avoid API costs but needs compatible hardware.

The Codex mode in ChatGPT is easier if you prefer a familiar graphical interface. Claude Code often feels more direct if you spend most of your day in the terminal and want a dense interactive surface with fine-grained permissions. If you already pay for one provider, start with the included tool.

The standard Anthropic and OpenAI model services require an internet connection. Ollama documents local-model setups for both Codex and Claude Code. That is a third-party configuration; setup, sign-in, and some features may still need connectivity. Anthropic's own Claude Code installation documentation lists internet access as a requirement. The open-source LLM directory compares models that you can run locally.

FH

Finn Hillebrandt

AI Expert & Blogger

Finn Hillebrandt is the founder of Gradually AI, an SEO and AI expert. He helps online entrepreneurs simplify and automate their processes and marketing with AI. Finn shares his knowledge here on the blog in 50+ articles as well as through the AI Business Club.

Learn more about Finn and the team, follow Finn on LinkedIn, join his Facebook group for ChatGPT, OpenAI & AI Tools or do like 17,500+ others and subscribe to his AI Newsletter with tips, news and offers about AI tools and online business. Also visit his other blog, Blogmojo, which is about WordPress, blogging and SEO.