Skip to main content

Claude Code vs Codex: Anthropic's CLI vs OpenAI's Coding Agent (2026)

Comparing Claude Code (Anthropic) and Codex (OpenAI) — supervised local terminal vs async cloud delegation, multi-interface, open source, models, pricing, and which to pick.

ByUpdated
🌐 This article was machine-translated and may contain inaccuracies. Read the Korean original if in doubt.

"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 most visible difference is the default way of working — Claude Code defaults to a supervised local terminal workflow, while Codex is a multi-interface tool spanning CLI, cloud, IDE, and a desktop app. As of November 2026, though, Claude Code also runs cloud sessions, so "local vs cloud" no longer separates the two cleanly.

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5.5 / Claude Haiku 5.5 (higher tier: Claude Fable 5.2). This notice changes only when Anthropic ships a new model.

Fable subscription (updated November 17, 2026): Claude Fable 5.2, released November 9, 2026, is the current Fable model; Fable 5.1 and Fable 5 are now legacy. Plan terms are the same for all three — Max and Ultra plans and premium seats on Team and seat-based Enterprise plans include Fable at up to 50% of the weekly usage limit; Pro plans and standard seats use usage credits (not available on Free). API pricing is $8/M input and $40/M output tokens for Fable 5.2, and $10/$50 for Fable 5.1 and 5. Some cybersecurity and biology requests may be answered by an Opus model due to safety classifiers. See the Fable 5.2 launch news and the Fable 5.2 guide for details.

Claude Code vs Codex at a glance Item Claude Code Codex (OpenAI) Made by Anthropic OpenAI Form Terminal CLI, supervised CLI + cloud + IDE Models Claude (Opus, Sonnet) GPT-6 family Strength Local supervised, multi-file Async cloud delegation CLI open source No Yes (Apache-2.0) Pricing Included in $20 Pro/Max Included in ChatGPT plans Both handle daily work on a ~$20 plan. Benchmark scores vary by source,version, and date, so they're hard to state as fact. As of November 2026.

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.

Per OpenAI's official docs as of November 2026, the recommended models are in the GPT-6 family (Astra, GPT-6.1 Sol, GPT-6.1 Terra, Luna). GPT-5.5 was retired from Codex for ChatGPT sign-in users on October 14, 2026. Codex is included in ChatGPT plans; the official pricing page lists Free $0, Go $8, Plus $20, Pro from $100 ($100, $200, or $500), and Business from $20 per user (billed annually, 2+ users). Available models and usage differ by plan.

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, Ultra, and Team plans, and it can also run cloud sessions (claude.ai/code, or claude --cloud from the terminal). (See how to use Claude Code.)

Key differences

  • Workflow: Claude Code defaults to a supervised local flow with the developer in the loop, and can also delegate asynchronously through cloud sessions. Codex pairs a local CLI with async cloud delegation (Codex Web) as a first-class mode (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.
Both are terminal-based coding agentsSimilar features — what decides itModel & ecosystemWhich vendor\u2019s modeland tools fit youSubscription & priceIncluded in a planyou already have?Personal tasteCommands, UX, flowthat fit your handsStrengths vary by task/version — try both and pick · as of 2026.11

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.

Disclaimer: The base model versions, interfaces, context, pricing, and benchmark scores for both tools change often. Commonly cited benchmark numbers vary by source, version, and date, so this article doesn't state specific scores as fact (performance is a general tendency). Verify the latest in each official doc (code.claude.com, OpenAI Codex docs). This site is not affiliated with Anthropic or OpenAI.

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 (the local CLI runs in your terminal)
You want to queue tasks and come back later ✅ Cloud sessions (claude.ai/code, claude --cloud) on Pro, Max, Ultra, and Team ✅ Async cloud delegation (Codex Web)
Your codebase is sensitive / offline ⚠️ Local sessions edit files on your machine, but the code Claude reads is sent to Anthropic's API; cloud sessions run on Anthropic-managed infrastructure ⚠️ Prompts go to OpenAI; cloud mode clones your repo into OpenAI's sandbox
You already use VS Code or JetBrains daily ✅ VS Code and JetBrains extensions available ✅ IDE extension available (VS Code, Cursor, Windsurf)
You prefer open-source tooling ❌ Not open source (proprietary) ✅ Codex CLI is open source (Apache-2.0)
Budget: pay-per-use vs flat subscription Included with Claude Pro, Max, Ultra, and Team — check claude.com/pricing for current plan limits Included with ChatGPT plans (Free $0, Go $8, Plus $20, Pro from $100, Business from $20/user) — check developers.openai.com/codex/pricing for current limits

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) (a Claude Pro, Max, Ultra, or Team plan for Claude Code; a ChatGPT account for Codex).

Claude Code — 3 steps

  1. Install globally (verify package name at code.claude.com before running):
    npm install -g @anthropic-ai/claude-code
  2. Open your project folder in a terminal, then run:
    claude
  3. 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

  1. Install (verify at github.com/openai/codex before running):
    npm install -g @openai/codex
  2. Run in your project folder:
    codex
  3. Success signal: Select Sign in with ChatGPT (the method the official README recommends) and the CLI shows a task prompt. For cloud async tasks, use Codex Web at chatgpt.com/codex — the agent runs in a sandboxed environment and posts results when done.

Stuck? The most common blocker is sign-in. For Claude Code, run claude and log in with your Claude subscription account; if ANTHROPIC_API_KEY is set in your shell, Claude Code uses that key and bills pay-as-you-go instead of your subscription. For Codex, run codex and choose Sign in with ChatGPT; signing in with an API key needs additional setup.

Was this helpful?

Keep reading