First-party only — a session id and where you arrived from, so we can tell which pages are worth writing more of. No advertising, no third-party trackers, nothing that follows you off this site.
Both are on this list because they are genuinely good at something. The question is which something you need. Below is the factual comparison, then the honest answer about who each one is for.
Reviewed July 25, 2026 · pricing changes often, check the vendor
| Claude Code | Codex CLI | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Where it runs | Terminal | Terminal |
| Models | Claude models only (Opus / Sonnet / Haiku tiers) | OpenAI models (GPT-5 family / codex variants) |
| Pricing | From $20/mo (Pro) · usage-based API also available | Included with ChatGPT Plus/Pro/Business · or API key |
| Open source | No | Yes |
| Best for | Multi-file work in a repo you can describe well — the more context you put in CLAUDE.md, the further ahead it gets. | Teams already on ChatGPT plans who want a terminal agent with a clear sandbox story. |
Configuration is a first-class feature — memory files, skills, hooks and permissions are documented and versionable in the repo
Works on the real filesystem and the real shell, so it can run your tests instead of guessing whether they pass
Subagents let you fan work out without polluting the main context window
Anthropic models only — you cannot point it at a different provider
Terminal-first, which is a poor fit if you want inline autocomplete while you type
Heavy usage on the $20 plan runs into limits fast; the useful tiers cost more
The sandbox model is explicit and configurable, which makes autonomous runs less alarming
AGENTS.md is a plain convention other tools have adopted, so the config is portable
Local and cloud execution share the same interface
OpenAI models only
The cloud environment needs its own setup before it is useful on a private repo
Approval modes are powerful and easy to set too permissively
Pick Claude Code if multi-file work in a repo you can describe well — the more context you put in CLAUDE.md, the further ahead it gets.
Pick Codex CLI if teams already on ChatGPT plans who want a terminal agent with a clear sandbox story.
And a thing worth saying plainly: the gap between these two is smaller than the gap between a repo that tells an agent what it is and one that does not. If you are choosing between them to fix inconsistent output, the tool is probably not the variable. The free Foundations track covers the part that is.