Claude Code vs Codex
Short answer
Both are terminal coding agents that come with a subscription you may already pay for: Claude Code from Claude Pro ($20 a month), the Codex CLI from ChatGPT Plus ($20 a month). They differ most in safety defaults (Claude Code's auto mode reviews each action with a classifier; Codex runs commands in an OS sandbox and asks before leaving the workspace), in config files (CLAUDE.md vs AGENTS.md) and in license (the Codex CLI is open source under Apache-2.0; Claude Code isn't). Neither has to replace the other: they keep separate logins and can work side by side.
At a glance
Everything below comes from Anthropic’s and OpenAI’s own pages, checked November 14, 2026. Prices are in USD before tax, and both vendors change them.
| Claude Code | Codex | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Cheapest plan that includes it | Claude Pro, $20/month ($17 billed yearly) | ChatGPT Plus, $20/month |
| Bigger plans | Max $100, Ultra $200 | Pro from $100 ($100, $200 or $500) |
| Teams | Team, $20–25 per standard seat; Enterprise | Business, $20–25 per user; Enterprise |
| With an API key | Yes, Anthropic Console | Yes, CLI and IDE extension |
| Limits | 5-hour and weekly windows | 5-hour windows; weekly limits may apply |
| Safety by default | Auto mode: a classifier reviews actions | Sandbox in the workspace, asks to go beyond it |
| Instructions file | CLAUDE.md (or AGENTS.md when there’s none) |
AGENTS.md |
| One-shot runs | claude -p |
codex exec |
| Pick up the last session | claude -c |
codex resume --last |
| Source | Closed, all rights reserved | CLI open source, Apache-2.0 |
Plans and prices
Claude Code isn’t in Claude’s Free plan. It comes with Pro ($20 a month, or $17 a month billed yearly at $200), Max ($100) and Ultra ($200), and with Team seats ($20 a month billed yearly or $25 monthly for a standard seat; $100 or $125 for a premium seat with five times the usage). Enterprise is $20 a seat billed yearly, with a 20-seat minimum, plus usage at API rates. It also works with an Anthropic Console account billed by the API. (Claude pricing)
Codex comes with ChatGPT Plus ($20 a month), which lists Codex on the web, in the CLI, in the IDE extension and on iOS. Pro starts at $100 a month, with tiers at $100, $200 and $500. Business is $20 a user a month billed yearly, or $25 monthly. Free and Go list only the desktop app, subject to rollout. An API key works in the CLI, the SDK and the IDE extension, billed at API rates, without the cloud features. (Codex pricing)
Usage limits
Both meter your plan in windows, and both burn faster when you run several agents.
- Claude resets usage every 5 hours and every week. Max gives five times Pro’s usage; Ultra has no 5-hour limit. On Team and Enterprise, each seat’s Claude Code usage is shared with Claude chat. Claude Code’s docs say ten parallel sessions use your quota roughly ten times as fast as one. (Costs)
- Codex counts usage per 5-hour period, with an estimated range of messages per model that OpenAI publishes for Plus and Business. Weekly limits may also apply. Pro has no 5-hour limit. Local tasks and cloud tasks draw from the same allowance, and ChatGPT’s other work features share it too. (Codex pricing)
Permissions and sandboxing
This is where they differ most out of the box.
Claude Code has permission modes, from Manual (only reads run without asking) to acceptEdits, plan, auto and bypassPermissions. Auto mode is the starting mode for terminal sessions: a separate classifier reviews each action and blocks anything that goes beyond what you asked. Anthropic says plainly that it doesn’t guarantee safety. A separate Bash sandbox can limit which files and hosts shell commands reach. (Permission modes)
Codex combines a sandbox mode (read-only, workspace-write, danger-full-access) with an approval policy (on-request, never or granular rules). By default it reads, edits and runs commands inside your workspace, and asks before writing outside it or using the network. Folders like .git stay read-only even then. On a Mac, the sandbox is enforced by the operating system. (Approvals and security)
Both have a switch that turns every check off. Both vendors say to keep it for isolated environments.
Instructions and config files
- Claude Code reads
CLAUDE.mdfrom your project, your user folder and your organization at the start of every session. When there’s noCLAUDE.md, it readsAGENTS.mdinstead. (Memory) - Codex reads
AGENTS.mdbefore any work: a global one in~/.codex, then one per folder from the repo root down to where you are, up to 32 KiB by default. (AGENTS.md)
To keep one set of rules for both, write them in AGENTS.md and import it from CLAUDE.md.
Scripts, sessions and extensions
- One-shot runs:
claude -p "…"andcodex exec "…"both run a task and exit, with JSON output for scripts. - Pick up where you left off:
claude -ccontinues the folder’s last conversation andclaude -rresumes one by name.codex resume --lastdoes the same for Codex, andcodex forkbranches a session. - Extensions: both support MCP servers, subagents, hooks and skills.
- Worktrees:
claude --worktree <name>andcodex exec --worktreeboth start work in a separate copy of the repo. - Where they run: both have a CLI, IDE extensions, a desktop app, the web and mobile.
- Source: the Codex CLI is open source under Apache-2.0; OpenAI’s IDE extension and cloud aren’t. Claude Code isn’t open source.
Which one for which job
- You already pay for ChatGPT Plus or more: Codex is in your plan.
- You already pay for Claude Pro or more: Claude Code is in your plan.
- You want commands fenced in by the operating system by default: Codex’s workspace sandbox.
- You want fewer prompts with a reviewer on each action: Claude Code’s auto mode.
- You want to read or patch the agent’s source: the Codex CLI.
- You have both plans: use both. One writes, the other reviews its branch.
Run both on one board
They don’t have to compete for a terminal tab. In Tendeck (we make it, so weigh this accordingly), Claude Code and Codex both get the whole board: each card reads as a clean conversation or flips to the real terminal, each account shows its limits, and you answer permission requests right on the card. ⌘K sends one order to a single agent or to all of them, and each agent can work in its own copy of the repo, on its own branch.
Related: Codex on Tendeck · every agent Tendeck runs · run several agents in parallel · Tendeck vs tmux
Questions people ask
Is Claude Code free?
No. Claude's Free plan doesn't include Claude Code. It starts with Pro, at $20 a month or $17 a month billed yearly, and it also works with an Anthropic API account. Checked November 14, 2026.
Can I use Codex with a free ChatGPT account?
OpenAI's pricing page lists only the desktop app for Free and Go, subject to rollout. The CLI, the IDE extension, the web and iOS are listed from Plus, at $20 a month. An OpenAI API key also works in the CLI, billed at API rates. Checked November 14, 2026.
Can Claude Code and Codex share one instructions file?
Yes. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and reads AGENTS.md instead when there's no CLAUDE.md. If you keep both, have CLAUDE.md import AGENTS.md so both agents follow the same rules.
Can I run Claude Code and Codex in the same repo?
Yes, as long as they don't edit the same files at once. Give each one its own git worktree: both have a --worktree option. Then one can write while the other reviews.