Claude Code and OpenAI's Codex CLI are the two most widely used terminal coding agents. On paper they have converged: both read project instructions, ask before risky actions, support hooks, skills, MCP and subagents, and run headless in CI. In practice they still feel different, and many developers now use both.
This guide compares them on the points that matter day to day, then shows how to run them side by side.
Facts checked on September 24, 2026, against OpenAI's and Anthropic's documentation. Models, prices and limits change often; follow the links for current details.
The short answer
- Choose Claude Code if you want the deepest agent workflow around a single tool: plan mode, permission modes including an automatic classifier, built-in worktrees, agent teams and a very broad set of surfaces.
- Choose Codex CLI if you already pay for ChatGPT, want an open-source CLI (Apache-2.0), or prefer its operating-system sandbox and
/reviewflow. - Use both if you can. Different models catch different mistakes, and each one's usage limits run out at different times.
At a glance
| Claude Code | Codex CLI | |
|---|---|---|
| Maker | Anthropic | OpenAI |
| Models (Sept 2026) | Opus 5.5 by default on paid plans; Sonnet 5, Haiku and Fable 5.1 available | GPT-6 family (Astra, Sol, Luna); GPT-5.6 models during the rollout |
| Included with | Claude Pro ($20), Max ($100 or $200), Team, Enterprise; or API billing | ChatGPT Plus ($20), Pro (from $100), Business, Enterprise and Edu; or an API key |
| Open source | No | Yes, Apache-2.0 (written in Rust) |
| Instructions file | CLAUDE.md (can also read AGENTS.md) |
AGENTS.md |
| Config | settings.json |
config.toml |
| Permissions | Modes: Manual, accept edits, plan, auto, don't ask, bypass | Sandbox modes (read-only, workspace-write, full access) plus an approval policy |
| Built-in worktrees in the CLI | Yes, claude --worktree |
No flag; worktrees live in the desktop app |
| Headless | claude -p |
codex exec |
| Local code review | /code-review |
/review |
| Check usage limits | /usage |
/status |
Access and pricing
Claude Code is included with Claude Pro ($20 per month), Max 5x ($100) and Max 20x ($200), and with Team and Enterprise plans. The free Claude plan does not include it. You can also use it with an Anthropic API account and pay per token, or through Amazon Bedrock, Google Cloud and Microsoft Foundry.
Codex is included with ChatGPT Plus ($20 per month), Pro (from $100), Business and Enterprise plans, and its usage is shared with other ChatGPT agent features. You can also sign in with an API key and pay per token, which does not include Codex's cloud features.
Both meter subscription usage in five-hour windows with weekly limits on top. See our guides to Claude Code usage limits and Codex usage limits.
Models
Claude Code defaults to Opus 5.5 on paid plans, with sonnet (Sonnet 5), haiku, opusplan (Opus for planning, Sonnet for execution) and fable (Fable 5.1) as aliases. Switch with /model.
Codex uses OpenAI's GPT-6 family: Astra (most capable), Sol (complex coding and agentic work) and Luna (efficient). GPT-5.6 models remain available during the rollout, and GPT-5.5 retires on October 14, 2026.
Model quality changes release to release, so we will not declare a winner here. The more useful habit is to try the same real task on both and keep the one that fits your codebase.
Project instructions and configuration
Claude Code reads CLAUDE.md files and keeps its own auto memory; it can also read AGENTS.md. Settings live in ~/.claude/settings.json, .claude/settings.json and .claude/settings.local.json.
Codex reads AGENTS.md: a global one in ~/.codex and one per directory from the repository root down, capped at 32 KiB combined by default. Settings live in ~/.codex/config.toml and, for trusted projects, .codex/config.toml.
Tip for using both: keep your real instructions in AGENTS.md and have CLAUDE.md point to it, so both agents follow one source of truth.
Permissions and safety
The two tools take different approaches to keeping an agent in bounds.
- Claude Code uses permission modes: Manual (asks before edits and commands), accept edits, plan (read-only planning), auto (a classifier reviews each action), don't ask and bypass. Shift+Tab cycles through them, and allow, ask and deny rules fine-tune them. An optional sandbox uses Seatbelt on macOS.
- Codex separates what the agent can touch (sandbox: read-only, workspace-write or full access) from when it asks (approval policy). The sandbox is on by default and uses Seatbelt on macOS, bubblewrap on Linux and a native sandbox on Windows. An auto-review option routes approvals to a reviewer agent.
In practice, Codex leans on an operating-system sandbox that is on by default, while Claude Code leans on permission modes and rules that control how often you are asked.
Workflow features
| Feature | Claude Code | Codex CLI |
|---|---|---|
| Plan before editing | plan mode, opusplan |
/plan |
| Hooks | Yes | Yes |
| Skills and plugins | Yes | Yes (custom prompts are deprecated in favor of skills) |
| MCP servers | Yes | Yes |
| Subagents | Yes, plus agent teams and background agents | Yes, including custom agents |
| Resume sessions | claude --continue, --resume |
codex resume, /resume |
| Images | Paste into the prompt | --image or paste |
| Other surfaces | IDEs, desktop, web, mobile, Slack, GitHub Actions, Chrome, Agent SDK | IDE extension, ChatGPT desktop and web, Codex cloud, mobile remote, GitHub, Slack, Linear, SDK |
Both are mature. Differences show up more in defaults and feel than in missing features.
Using Codex and Claude Code together
Running both on the same project is one of the most effective setups we know:
- Claude Code implements. Start it in a worktree for the task (
claude --worktree feature-search). - Codex reviews. When Claude finishes, run Codex in the same folder and use
/reviewagainst the uncommitted changes, or a saved review prompt. - Send findings back. Paste Codex's findings into Claude Code and let it fix them.
- Swap roles when limits run low. If Claude is close to its five-hour limit and Codex is not, let Codex take the next task.
Keep shared instructions in AGENTS.md, and give each agent its own worktree if both will edit code. Our parallel agents guide covers the full setup.
In Vibe Console
Vibe Console is built for exactly this. Start Claude Code and Codex in side-by-side terminals with ⌘K, see both agents' running or idle state on their tabs, hear when either finishes or needs input, and watch both providers' usage rings in the notch, with reset times, pace and alerts at 80% and 100%. The diff you are reviewing is one click away in the built-in editor and Source Control.
Which should you choose?
| If you… | Choose |
|---|---|
| Already pay for ChatGPT | Codex |
| Already pay for Claude | Claude Code |
| Want an open-source CLI | Codex |
| Want built-in worktrees and fine-grained permission modes in the CLI | Claude Code |
| Want a second opinion on every change | Both, one implementing and one reviewing |
FAQ
Is Codex better than Claude Code?
Neither is better for every task, and both change quickly. Try the same real task on each, or use one to implement and the other to review.
Can Claude Code read AGENTS.md?
Yes. Claude Code can read AGENTS.md alongside or instead of CLAUDE.md, which makes it easy to share instructions with Codex.
Is Codex CLI free?
The CLI is open source, but using it needs a ChatGPT plan that includes Codex or an API key billed per token.
Can I use both with one subscription?
No. Claude Code uses Anthropic's plans or API, and Codex uses OpenAI's. Many developers keep a plan with each.
Try running both side by side free for 14 days: download Vibe Console.
