Claude Codex: Claude Code vs OpenAI Codex, and Using Both
Updated 2026-10-04
There is no product called "Claude Codex." People who search for it almost always mean one of two things: a comparison of Claude Code (Anthropic's agentic coding tool) with Codex (OpenAI's coding agent), or a way to use the two together. Both are terminal-first coding agents that read your repository, edit files and run commands; the practical differences are the models behind them, the plans that unlock them, and how each is configured. Since March 31, 2026 you can also call Codex from inside Claude Code through an official OpenAI plugin.
Claude Code and Codex at a glance
| Claude Code | OpenAI Codex | |
|---|---|---|
| Maker | Anthropic | OpenAI |
| Models | Anthropic's Claude models (Opus / Sonnet families) | OpenAI GPT models; the CLI defaults to GPT-6.1 Sol since the September 29, 2026 DevDay refresh |
| Where it runs | Terminal, desktop app, VS Code-family editors, JetBrains, web | Terminal, desktop app, IDE extensions, cloud tasks |
| Account | Claude Pro, Max, Team, Enterprise, or Anthropic Console API billing (not the free plan) | Sign in with a ChatGPT plan (Plus, Pro, Business, Edu, Enterprise) or an OpenAI API key |
| Project instructions file | CLAUDE.md |
AGENTS.md |
| CLI source code | Proprietary | Open source (Apache-2.0) on GitHub |
Plan names and prices change often, so check the current pricing pages of Anthropic and OpenAI before you subscribe. If you mainly want to understand the Claude model tiers inside Claude Code, see Opus vs Sonnet.
How to install each tool
Claude Code
- On macOS, Linux or WSL run:
curl -fsSL https://claude.ai/install.sh | bash - On Windows PowerShell run:
irm https://claude.ai/install.ps1 | iex - Open your project folder and type
claude. - Sign in through the browser with a paid Claude account or a Console account with API billing.
The native installer ships its own runtime, so Node.js is not required (the older npm install needs a recent Node.js).
OpenAI Codex CLI
- Install with npm:
npm install -g @openai/codex– or with Homebrew:brew install --cask codex. - Run
codexin your project folder. - Choose "Sign in with ChatGPT" to use your plan, or configure an API key.
At DevDay on September 29, 2026, OpenAI said the refreshed Codex CLI defaults to GPT-6.1 Sol (version 0.159.1 and later) and added voice input, an /agents view and session resume. If you want to know what that model is, read our GPT-6.1 Sol explainer.
How the two agents differ in daily use
Instructions and memory. Claude Code reads CLAUDE.md files (global, project and folder level) to learn your conventions. Codex reads AGENTS.md files in the same layered way. Many teams keep one AGENTS.md and make CLAUDE.md point to it, so both agents follow the same rules.
Models. Claude Code always runs Anthropic models; you can switch between tiers in the session. Codex runs OpenAI models and lets you pick a model and reasoning effort. The model matters more than the wrapper for hard bugs, so test both on your own repository rather than relying on generic benchmark charts.
Local vs cloud. Both run locally by default and ask before risky actions. Both also offer cloud execution: Codex can hand tasks to OpenAI-hosted environments and review pull requests, and Claude Code can run sessions on Anthropic-managed cloud machines and from the web.
Extensibility. Claude Code supports plugins, slash commands, subagents and hooks. Codex supports MCP servers, custom prompts and a configurable config.toml. Both speak MCP, so the same tool servers can usually be shared.
Open source. The Codex CLI repository is public under Apache-2.0, which helps if you want to audit or fork the client. Claude Code is a proprietary tool.
Using Codex inside Claude Code (the "Claude + Codex" setup)
On March 31, 2026 OpenAI published openai/codex-plugin-cc, an official plugin that lets Claude Code delegate work to Codex. A common pattern is "Claude writes, Codex reviews" – a second model catches mistakes the first one misses.
Steps:
- Install the Codex CLI and sign in (ChatGPT account or API key). Node.js 18.18+ is required for the plugin.
- In Claude Code, add the marketplace:
/plugin marketplace add openai/codex-plugin-cc - Install the plugin from that marketplace and restart the session if asked.
- Use the new commands:
/codex:review– a read-only code review of your changes/codex:adversarial-review– a tougher review that challenges design and risks/codex:rescue– hand a bug investigation or fix to Codex
The plugin reuses your existing Codex login and configuration, can run tasks in the background, and has an optional review gate that holds Claude Code's completion until the Codex review finishes. Codex usage counts against your OpenAI plan or API key, and Claude usage against your Anthropic plan – you pay for both.
Which one should you pick?
- You already pay for ChatGPT Plus or higher: start with Codex; it is included and the CLI is quick to set up.
- You already pay for Claude Pro or Max: start with Claude Code.
- You want the open-source client: Codex CLI.
- You ship critical code: use one agent to write and the other to review, via the plugin above.
- You are comparing with Google's tools too: see our Gemini Code guide.
The fairest test is a one-week trial on real tickets: same repository, same instructions file, and a record of how many corrections each agent needed.
FAQ
Is Claude Codex a real product?
No. Neither Anthropic nor OpenAI sells a product named "Claude Codex." The phrase usually refers to comparing Claude Code with OpenAI Codex, or to the official Codex plugin for Claude Code released by OpenAI on March 31, 2026.
Can Claude Code use OpenAI models?
Not natively – Claude Code runs Anthropic's Claude models. With the codex-plugin-cc plugin, Claude Code can hand reviews and tasks to Codex, which then runs on OpenAI models under your OpenAI account.
Is Codex free?
The Codex CLI is open source and free to install, but running it needs a ChatGPT plan that includes Codex or an OpenAI API key with billing. Check OpenAI's current plan page for which tiers include it and what the limits are.
Do I need a paid plan for Claude Code?
Yes. Claude Code requires a Claude Pro, Max, Team or Enterprise plan, or an Anthropic Console account with API billing. The free Claude plan does not include it.
Can Claude Code and Codex share the same project instructions?
Yes. Codex reads AGENTS.md and Claude Code reads CLAUDE.md. Keep your rules in one file and reference it from the other (for example a CLAUDE.md that includes @AGENTS.md), so both agents follow identical conventions.
Which model does Codex use now?
Since OpenAI's DevDay on September 29, 2026, the Codex CLI (version 0.159.1 and later) defaults to GPT-6.1 Sol. You can still pick other OpenAI models in the settings.