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.

I got this wrong. 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.

The previous version of this article mixed up Codex CLI, Codex Cloud, and the desktop app. It also contained stale models, incomparable benchmark scores, and the false claim that Gemini CLI had been discontinued. I did not patch a few paragraphs. I researched it again from scratch and tested both CLIs on the same Mac.

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

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.

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

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.

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.

CriterionInstalled version
Claude CodeCLI 2.1.234
CodexCLI 0.149.0-alpha.4.1
CriterionModel and mode
Claude CodeFable 5, High
Codexgpt-5.6-sol, reasoning none
CriterionTask
Claude CodeFind and fix a bug in a small JavaScript parser
CodexSame task in a separate copy
CriterionResult
Claude Code6/6 tests, only source file changed
Codex6/6 tests, only source file changed
CriterionDuration
Claude Code83.50 seconds
Codex36.12 seconds
CriterionObservation
Claude Code20 turns, repeated permission prompts in safe mode
Codex34,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. That does not prove Codex is generally faster. Fable 5 ran at high reasoning, while Sol ran without reasoning. That setting alone makes a direct time comparison unfair.

CLI vs. CLI

The Codex CLI works locally. OpenAI says so in its official CLI documentation. 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:
|
Feature
Claude Code
OpenAI 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

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.

# 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"

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.

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.

Desktop App vs. Desktop App

The old article got the desktop side wrong too. 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.

This product boundary follows the current Claude desktop documentation, ChatGPT desktop app documentation, and OpenAI's explanation of the three Codex modes.

AspectProduct
Claude DesktopCode tab in the Claude desktop app
ChatGPT Desktop with CodexCodex mode in the ChatGPT desktop app
AspectLocal work
Claude DesktopLocal on your own computer
ChatGPT Desktop with CodexLocal in the project folder
AspectRemote machine you control
Claude DesktopSSH connection
ChatGPT Desktop with CodexNo dedicated SSH mode documented
AspectIsolated local work
Claude DesktopAutomatic Git worktrees
ChatGPT Desktop with CodexWorktree mode with handoff
AspectCloud execution
Claude DesktopSelectable cloud environment
ChatGPT Desktop with CodexIsolated cloud container
AspectAdditional environment
Claude DesktopWSL on Windows
ChatGPT Desktop with CodexNative Windows or WSL2
AspectInterface
Claude DesktopChats, files, diff, terminal, and app preview
ChatGPT Desktop with CodexChats, files, diff, terminal, browser, and tasks
AspectParallel work
Claude DesktopMultiple sessions and Dynamic Workflows
ChatGPT Desktop with CodexMultiple threads and subagents
AspectConfiguration
Claude DesktopShares CLAUDE.md, skills, hooks, and MCP with the CLI
ChatGPT Desktop with CodexShares config.toml, AGENTS.md, skills, hooks, and MCP with the CLI
AspectRemote
Claude DesktopRemote Control operates the local CLI
ChatGPT Desktop with CodexChatGPT Remote operates the connected computer
AspectOperating systems
Claude DesktopmacOS, Windows, Linux beta
ChatGPT Desktop with CodexmacOS, Windows, Linux preview

Claude Desktop in Daily Work

The Code tab opens folders, shows files and diffs, includes a terminal, and can preview an app. Local desktop sessions for Git repositories start in a dedicated worktree by default. This lets several tasks run side by side without modifying the same checkout. Local selects your computer as the execution target. For a Git repository, the session still uses the isolated worktree.

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.

ChatGPT Desktop with Codex in Daily Work

The ChatGPT app opens projects and Codex chats, displays files, diffs, and terminal output, and can use browser and computer tools. Local mode 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.

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 creates one automatically for each Git session, while Codex requires you to choose Worktree mode.

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.

Every Model Available Right Now

I did not rely on marketing pages alone. I opened the model pickers in both locally installed CLIs. Your selection can still differ by plan, organization, and rollout. The API prices below are per 1 million input and output tokens. They are not equivalent to subscription usage limits.

I checked the specifications and prices against Anthropic's official model overview and OpenAI's official Codex model overview.

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.

Claude Code Models

Sources: local Claude Code picker and official Anthropic model overview, checked August 24, 2026.

ModelClaude Fable 5
Role in the pickerHighest-capability option, aliases fable and best
ReleasedJun 9, 2026
Context1M
Max output128,000
API input / output$10 / $50
ModelClaude Opus 5
Role in the pickerStrong model for complex work
ReleasedJul 24, 2026
Context1M
Max output128,000
API input / output$5 / $25
ModelClaude Sonnet 5
Role in the pickerBalanced everyday model
ReleasedJun 30, 2026
Context1M
Max output128,000
API input / output$2 / $10
ModelClaude Haiku 4.5
Role in the pickerFastest and least expensive option
ReleasedOct 15, 2025
Context200,000
Max output64,000
API input / output$1 / $5

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 is 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.

Codex Models

Sources: local Codex picker and official OpenAI model pages, checked August 24, 2026.

Modelgpt-5.6-sol
Role in the pickerFlagship for difficult coding work
Knowledge cutoffFeb 16, 2026
Context1.05M
Max output128,000
API input / output$4 / $20
NoteReasoning up to Max
Modelgpt-5.6-terra
Role in the pickerBalanced everyday option
Knowledge cutoffFeb 16, 2026
Context1.05M
Max output128,000
API input / output$2 / $12
NoteReasoning up to Max
Modelgpt-5.6-luna
Role in the pickerFast and inexpensive for routine work
Knowledge cutoffFeb 16, 2026
Context1.05M
Max output128,000
API input / output$0.20 / $1.20
NoteReasoning up to Max
Modelgpt-5.5
Role in the pickerPowerful previous-generation model
Knowledge cutoffDec 1, 2025
Context1.05M
Max output128,000
API input / output$5 / $30
NoteStill selectable
Modelgpt-5.4
Role in the pickerPrevious-generation model
Knowledge cutoffAug 31, 2025
Context1.05M
Max output128,000
API input / output$2.50 / $15
NoteChatGPT access ends August 31, 2026
Modelgpt-5.4-mini
Role in the pickerSmaller previous-generation model
Knowledge cutoffAug 31, 2025
Context400,000
Max output128,000
API input / output$0.75 / $4.50
NoteChatGPT access ends August 31, 2026
Modelgpt-5.3-codex-spark
Role in the pickerVery fast text model in research preview
Knowledge cutoffNot published
ContextNot published
Max outputNot published
API input / outputNo API price
NoteChatGPT Pro only

The GPT-5.6 family provides three useful tiers. Sol is built for difficult work, Terra covers most everyday tasks, and Luna handles fast, repeatable jobs. Luna's API price stands out at $0.20 input and $1.20 output. Spark is not a normal API alternative. It is a text-only research preview for ChatGPT Pro.

GPT-5.4 and GPT-5.4-mini still appeared in the picker on the test date. OpenAI removes them from Codex for ChatGPT-authenticated users on August 31, 2026. The model documentation says API-key authentication is unaffected. I would still avoid using either as the default for a new workflow.

Which Model Is Better?

You cannot build a serious ranking from vendor benchmark tables. Anthropic and OpenAI publish scores with different agent harnesses, tools, limits, and prompting setups. Even the same benchmark name does not make two results directly comparable.

Your workflow should drive the choice. Fable 5 and Sol are the quality options. Sonnet 5 and Terra are the balanced models. Haiku 4.5 and Luna are the fast, inexpensive models. Test your own repositories with identical tasks, permissions, and acceptance tests.

Changelogs and Development Speed

I counted official GitHub releases through August 24, 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 August 24, 2026.

Period30 days
Claude Code21 releases, one every 1.43 days
Codex CLI6 releases, one every 5.0 days
Period90 days
Claude Code78 releases, one every 1.15 days
Codex CLI29 releases, one every 3.1 days
Period180 days
Claude Code154 releases, one every 1.17 days
Codex CLI54 releases, one every 3.3 days

Claude Code 2.1.241 from August 23 was the latest Claude release in the measurement. Codex 0.149.1 arrived on August 24. Claude averages roughly one release every 1.2 days across all three windows. Codex averages one stable release every three to five days.

This proves a higher publishing frequency at Anthropic, not automatically more substance. 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.

The sources are the official Claude Code releases, the official Codex releases, and OpenAI's Codex changelog.

Requirements and Installation

ItemCLI systems
Claude CodemacOS 13+, Windows 10 1809+ or Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine 3.19+
CodexmacOS, Linux, and Windows, with no published minimum version
ItemArchitecture
Claude Codex64 or ARM64
Codexx64 or ARM64, depending on the system package
ItemMemory
Claude CodeAt least 4 GB according to Anthropic
CodexNo official minimum published
ItemAuthentication
Claude CodeClaude Pro, Max, Team, Enterprise, Console, or a supported cloud provider
CodexChatGPT or API key, with ChatGPT login required for cloud
ItemDesktop
Claude CodemacOS, Windows, Linux beta
CodexmacOS, Windows, Linux preview
ItemInternet
Claude CodeRequired
CodexRequired
# 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.

I would never copy installation commands blindly from a blog. Check the current Claude Code installation guide or Codex CLI documentation first. Package paths and platform notes move quickly when a tool ships this often.

Prices and Usage Limits

Claude Code is included in Claude Pro at $20 per month. Max starts at $100 and reaches $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 pricing page includes Codex in ChatGPT Free, Go at $8, Plus at $20, Pro from $100, and Business at $25 monthly or $20 with annual billing. Your exact usage depends on the model, task, and plan. Spark is restricted to Pro.

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.

The current Claude pricing page and Codex pricing page are authoritative. Both providers can change limits and plan contents at short notice.

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. 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. Team, Enterprise, and API data are not used for training by default. OpenAI also separates consumer and business data policies. For confidential code, check the actual contract, workspace settings, and retention policy.

The details are in Anthropic's Claude Code data policy and OpenAI's Codex security documentation.

  • 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.

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 automatic 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.

Frequently Asked Questions

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.