"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.
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.