Claude Code vs OpenAI Codex CLI
Claude Code and OpenAI Codex CLI are both AI coding agents that work from your terminal: you describe a change, and the agent reads your code, edits files and runs commands. Here's how they differ on the basics.
| Claude Code | OpenAI Codex CLI | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Open source | No | Yes (github.com/openai/codex) |
| Pricing label in our directory | Paid | Open source. Per its README, you use it with a ChatGPT plan or an OpenAI API key. |
| Where it runs | Terminal | Terminal |
| Official link | anthropic.com/claude-code | github.com/openai/codex |
When each one fits
- You're already on Anthropic's models or plans: Claude Code is Anthropic's own agent.
- You're already on OpenAI's models or plans, or you want to read and modify the agent's source: Codex CLI is open source and made by OpenAI.
- You want to try both: they're installed separately and can live side by side. Try each on the same small task in a throwaway branch.
Things to check on the official sites
Current pricing and plan limits, supported operating systems, and data and privacy terms for your code. Both tools change quickly, and we link to the source rather than repeating details that go stale.
Other terminal agents
Aider (open source, git-aware) · Gemini CLI (Google, open source) · Codex CLI vs Every Code · Claude Code vs Gemini CLI · All terminal agents compared · More comparisons
This comparison isn't sponsored.