Claude Code and OpenAI Codex both put an AI agent in your terminal. You describe a task, and the agent reads your files, edits them and can run commands. Here is how they differ on things we could verify in each vendor's docs.
The short version
| Claude Code | OpenAI Codex | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Install | curl -fsSL https://claude.ai/install.sh | bash (macOS, Linux, WSL), or Homebrew, WinGet, npm | npm install -g @openai/codex (Homebrew also listed) |
| Sign in with | A Claude plan, a Claude Console account or a supported cloud provider | A ChatGPT account (Plus, Pro, Business, Edu or Enterprise), or an API key |
| Free plan | No | Tied to ChatGPT plans or API use. OpenAI's page lists a Free plan for quick tasks, but check what it includes |
| Open source | No | The CLI is open source on GitHub |
| Project instructions | CLAUDE.md | AGENTS.md |
| MCP | Yes | Yes (documented in OpenAI's Codex docs) |
| Other ways to use it | Terminal, with IDE and desktop options | CLI, IDE extension and cloud |
Check each vendor's pricing page for current prices. We don't quote them because they change often.
Getting started
Both start the same way: open a terminal in your project folder and run the command (claude or codex). The first run walks you through signing in. If you've never used a terminal, our Claude Code install guide covers the basics, and the same ideas carry over to Codex.
Giving the agent standing instructions
Both read a plain-text Markdown file in your project so you don't have to repeat yourself:
- Claude Code reads
CLAUDE.md. Anthropic recommends keeping each file under about 200 lines, and/initcan generate a starting file by analysing your project. - Codex reads
AGENTS.md, a convention several other tools also read, including Cursor.
If you use more than one tool, an AGENTS.md is the most portable choice.
Extending the agent
Both support MCP servers (a standard for plugging extra tools into an AI). Claude Code also has skills (folders with a SKILL.md file that teach it a repeatable job), hooks and subagents. See our skills guide for a walkthrough.
Where each one fits
- Claude Code: the more extensible of the two in our view, and the obvious choice if you're already a Claude subscriber.
- OpenAI Codex: attractive if you're a ChatGPT subscriber, if you value an open-source CLI, or if you want a cloud option alongside the CLI.
Our verdict
This is a tool you're likely to choose by subscription. If you're paying for neither, try each for a week on a small real task. Their interfaces are similar enough that switching later is cheap.