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.
- 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.
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.
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.
| Feature | Claude Code | OpenAI Codex |
|---|---|---|
Basics(6 entries) | ||
| Manufacturer | Anthropic | OpenAI |
| Release Date | February 2025 | April 2025 |
| Open Source | No | Apache 2.0 |
| Primary Interface | Terminal (CLI) | Terminal (CLI) |
| Installation | Native installer, Homebrew, WinGet | Homebrew, npm, system packages |
| Operating Systems | Mac/Linux/Win | Mac/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 Tier | No | Limited |
| API Input Cost | $1-10/1M | $0.20-5/1M |
| API Output Cost | $5-50/1M | $1.20-30/1M |
| Prompt Caching | Yes | Yes |
Models & Context(9 entries) | ||
| Default Selection | Claude Opus 5 (1M) | gpt-5.6-sol |
| Highest Capability | Claude Fable 5 (best) | gpt-5.6-sol |
| Fast Model | Claude Haiku 4.5 | gpt-5.6-luna |
| Preview Model | No | gpt-5.3-codex-spark |
| Model Selection | /model | /model |
| Default Selection Context | 1M (Fable/Opus/Sonnet) | 1.05M (GPT-5.6) |
| Max Context | 1M Token | 1.05M Token |
| Output Limit | 128K Token | 128K Token |
| Reasoning Mode | Effort / adaptive | Low-Max |
Standards & Configuration(5 entries) | ||
| Config File | CLAUDE.md | AGENTS.md |
| MCP Support | Full | Full |
| Skills/Plugins | Skills/Plugins | Skills/Plugins |
| Custom Instructions | Rules & settings | Rules & settings |
| Project Context | Automatic | Automatic |
Integration & Surfaces(8 entries) | ||
| Git Integration | Git + worktrees | Git + worktrees |
| VS Code | Extension | Extension |
| JetBrains IDEs | Plugin | Terminal |
| Cursor Support | VS Code-compatible | VS Code-compatible |
| Neovim | Terminal | Terminal |
| Desktop App | Separate Claude app | Inside ChatGPT app |
| Web/Cloud | Separate cloud workflow | Separate cloud workflow |
| API Access | Full | Full |
Features & Capabilities(11 entries) | ||
| File Operations | Read/Write | Read/Write |
| Shell Commands | Local shell | Local shell |
| Code Generation | Yes | Yes |
| Refactoring | Yes | Yes |
| Debugging | Yes | Yes |
| Test Generation | Yes | Yes |
| Code Review | /review | codex review |
| Documentation | Yes | Yes |
| Image Input | Screenshots | Vision |
| Web Search | Yes | Yes |
| Codebase Analysis | Full | Full |
Autonomy & Agents(8 entries) | ||
| Autonomous Work | Yes | Yes |
| Subagents | Native | Native |
| Parallel Agents | Yes | Yes |
| Task Planning | Automatic | Automatic |
| Checkpoints | Rewind | Undo / Git diff |
| Context Compression | /compact | Automatic |
| Session Continuation | -c / -r | resume |
| Headless/Batch | -p Flag | codex exec |
Security & Privacy(4 entries) | ||
| Local Execution | Yes | Yes |
| Permissions System | Tools + OS sandbox | OS sandbox + approvals |
| Enterprise Options | Yes | Enterprise |
| Data Training | Plan-dependent | Plan-dependent |
Hands-on Test & Releases(3 entries) | ||
| Local Control Test | 6/6 tests | 6/6 tests |
| Control Test Duration | 83.50 s (Fable 5, High) | 36.12 s (Sol, None) |
| Stable Releases in 90 Days | 78 | 29 |
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.
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.
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.
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.
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
# 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.






