"Codex" is OpenAI's coding agent (relaunched in 2025 — not the deprecated 2021 Codex model). It's often compared with Claude Code (Anthropic), and the core difference is one thing — Claude Code is a supervised local terminal workflow, while Codex is a multi-interface tool that adds asynchronous cloud delegation on top of a local CLI.
🟢 Model references match the current lineup · model notice · Fable subscription
Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (
What is Codex?
OpenAI Codex comes in three forms:
- Codex CLI — a terminal coding agent. Open source (Apache-2.0).
- Codex cloud — hand it a task in ChatGPT and an isolated cloud sandbox clones your repo, edits code, runs tests, and presents changes (or a PR). You can delegate and do other work meanwhile.
- IDE extension — integrated into your editor.
It runs on GPT-5-family models and is included in ChatGPT plans (Free through Pro).
What is Claude Code?
Anthropic's Claude-only terminal CLI agent. It reads and edits files locally but defaults to a supervised flow that asks for approval before writes and commands. 1M context on Opus, with programmable hooks and subagents for fine-grained control. Included in Pro/Max. (See how to use Claude Code.)
Key differences
- Workflow: Claude Code is a supervised local flow with the developer in the loop. Codex also runs a local CLI but shines at async cloud delegation (give a spec, get a result).
- Isolation vs control: Codex uses OS-kernel sandboxing for strong boundaries but coarser control; Claude Code uses app-level hooks — weaker boundaries but finer control. → Kernel sandboxing for untrusted external code; hooks for enforcing org coding standards.
- Ecosystem: already on ChatGPT → Codex; already on Claude → Claude Code.
Which to choose
- Claude Code — when you want to review each step locally across multi-file, large codebases.
- Codex — when you throw detailed specs and delegate asynchronously, or do lots of terminal-native work.
- Both — each is enough for daily work on a ~$20 plan, so many developers run both (~$40/mo combined) and cross-check answers on hard problems.
Curious about Cursor (a GUI editor with multiple models)? See Claude Code vs Cursor.
Side-by-Side Decision Table
Use this table when you have a specific project type in mind. Every row maps to a real workflow difference — not just a spec sheet.
| Situation | Pick Claude Code | Pick Codex |
|---|---|---|
| You want to watch every file edit live | ✅ Supervised terminal — you approve each step | ❌ Cloud tasks run without you |
| You want to queue tasks and come back later | ❌ Requires active session | ✅ Async cloud delegation built-in |
| Your codebase is sensitive / offline | ✅ Runs entirely local | ⚠️ Cloud mode sends code to OpenAI servers |
| You already use VS Code or JetBrains daily | ⚠️ Terminal-first; IDE integration is secondary | ✅ Native IDE plugins available |
| You prefer open-source tooling | ✅ Claude Code is open source | ❌ Closed source |
| Budget: pay-per-use vs flat subscription | Included with Claude Pro / Max — check claude.ai/pricing for current plan limits | Usage-based cloud tasks — check platform.openai.com/pricing for current rates |
Quick-Start: Try Each Tool in Under 5 Minutes
Prerequisites: a terminal open, the relevant API access, and Node.js only if you install via npm (the Claude Code npm package requires Node.js 22+ since v2.1.198; the native installer needs no Node.js — official docs, September 2026; check the Codex CLI README for its own requirement) (Claude Pro/Max for Claude Code; OpenAI account with Codex enabled for Codex).
Claude Code — 3 steps
- Install globally (verify package name at code.claude.com before running):
npm install -g @anthropic-ai/claude-code - Open your project folder in a terminal, then run:
claude - Success signal: You see a prompt like
Claude Code >and Claude immediately lists the files it can see. Type a plain-English task — e.g. "Add input validation to login.js" — and approve each proposed edit.
Codex CLI — 3 steps
- Install (verify at platform.openai.com/docs/codex before running):
npm install -g @openai/codex - Run in your project folder:
codex - Success signal: The CLI confirms your OpenAI key and shows a task prompt. For cloud async tasks, check the Tasks tab in your OpenAI dashboard — the agent runs in a sandboxed environment and posts results when done.
Stuck? The most common blocker is a missing or expired API key. For Claude Code, set ANTHROPIC_API_KEY in your shell environment. For Codex, set OPENAI_API_KEY. Both tools will print a clear error message pointing to the missing variable.
Related articles
- Claude Code vs Cursor: Key Differences and Which to Choose
- Claude Code vs GitHub Copilot: What's Different and Which to Choose (2026)
- Claude vs Claude Code vs Cowork: What's the Difference? (2026)
- Claude Code Installation Guide: native vs npm, Windows Included
- Claude vs ChatGPT: Key Differences and When to Use Each (2026)