Skip to content
Skuto

Guides

Claude Code vs Codex: Which AI Coding Agent to Use?

Published:

Claude Code and Codex do the same job: you describe a change, an AI reads your project, edits the files and runs commands in your terminal, and you review the result. Pick the one your account already covers: Claude Code comes with Anthropic’s paid Claude plans, Codex with OpenAI’s ChatGPT plans, free one included. The rest is small. What differs is how you pay, what the undo button looks like, and which instructions file you keep. You can switch later, so don’t overthink it.

The core difference: whose account it runs on

These are two AI agents in the same shape. You open a terminal in your project folder, type one command, and talk to it in plain English. Claude Code is made by Anthropic and starts with claude. Codex CLI is made by OpenAI and starts with codex.

So skip “which one is smarter?” and ask “which subscription do I already have?” Sign-in is the real fork in the road:

  • Claude Code signs in with a Claude account. Pro, Max, Team, Enterprise and Console (API) accounts work. Anthropic’s setup page states that the free claude.ai plan does not include Claude Code.
  • Codex signs in with a ChatGPT account, or you can use an OpenAI API key and pay per token instead.

Already pay for ChatGPT Plus? Codex is part of it, so trying it costs nothing extra. Already pay for Claude Pro or Max? Same for Claude Code. If you pay for neither, the next section matters.

How you pay

Both columns come from each company’s pricing page, read on 29 October 2026. Prices are before tax and can change, so check the page again before you buy.

Claude CodeCodex
Free planNoYes, listed for quick coding tasks
Entry paid planClaude Pro, $20 a month ($17 billed yearly)ChatGPT Plus, $20 a month (Go is $8)
Heavier useClaude Max, from $100 a monthChatGPT Pro, from $100 a month
Pay per use insteadConsole (API) accountOpenAI API key

Two honest notes. First, Codex’s free and Go plans are for light work. OpenAI’s pricing page names the model for those plans only “in the desktop app”, so we can’t promise the terminal tool works the same on Free. Check your own account. Second, neither company gives you a fixed number of tasks. Anthropic says the limits are shared across Claude and Claude Code, so chatting in one counts against the other. OpenAI says ChatGPT Work and Codex share usage, and that the number of messages depends on the model and how big the task is. A long session on a big project burns more than a small fix.

Our Claude Code price breakdown goes deeper on the Claude side, and the free options are worth reading if you want to try it before paying.

Setup and memory files: CLAUDE.md vs AGENTS.md

Both install with one command and both start by signing you in. On macOS or Linux:

# Claude Code
curl -fsSL https://claude.ai/install.sh | bash
claude

# Codex
curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex

Windows has its own install command for each. On native Windows, Claude Code works with or without Git for Windows installed. If Git isn’t there, it runs commands through PowerShell. Codex’s page shows a Windows tab next to the macOS and Linux one, so use the command it lists there.

Next comes the part that saves you hours: the instructions file. It is a plain text file in your project that tells the AI how your project works, like “run npm test before you finish” or “never touch the legacy/ folder”. The AI reads it at the start of every session, so you stop repeating yourself.

  • Claude Code reads CLAUDE.md. Type /init and it drafts one from your code.
  • Codex reads AGENTS.md. Type /init there too, and it creates an AGENTS.md.

You don’t have to pick one. Anthropic’s docs say recent versions of Claude Code read AGENTS.md when your project has no CLAUDE.md. If you have both, by default it reads CLAUDE.md only. To keep one source of truth, create a CLAUDE.md whose first line is @AGENTS.md, then add anything Claude-specific below it. Codex’s docs never mention CLAUDE.md. They do document a project_doc_fallback_filenames setting for extra file names Codex can read when a folder has no AGENTS.md, but by default it reads AGENTS.md, so make AGENTS.md the shared file, not the other way round.

Keep whichever file you use short. Anthropic suggests under 200 lines per CLAUDE.md, because longer files use up context and make the AI follow them less well.

Safety nets: checkpoints vs approval modes

An AI agent can edit many files in one go. So before you let either one loose, know how you get back.

Claude Code has a rewind menu. It saves the state of your files before every prompt you send. Type /rewind, or press Esc twice on an empty prompt, and you can restore the code, the conversation, or both to an earlier point. It keeps snapshots for the 100 most recent checkpoints in a session. The limits are real, and the docs list them: changes a Bash command makes to a file Claude hadn’t edited aren’t tracked, edits made by subagents usually aren’t restored, and changes you make yourself outside Claude Code aren’t captured. Anthropic says plainly that checkpoints are not a replacement for version control. More in our guide to Claude Code’s rewind and checkpoints vs Git.

Codex leans on approval settings. The /permissions command sets when Codex may edit files or run commands without asking, and shows the active sandbox and the folders it can write to. /review checks your uncommitted changes, a commit, or a branch and reports findings without modifying your working tree. For undoing, Codex’s page advises you to create Git checkpoints before and after a task so you can revert changes. The pages we read didn’t describe a built-in rewind menu like Claude Code’s, so for Codex, Git is your undo button.

The practical answer is the same for both. Commit before you start. Read the diff before you accept. If you’re new to Git, Claude Code for non-developers walks through a safe first session, and most of it applies to Codex too.

Where each shines

The two overlap a lot, and we won’t invent a score. Skuto prints no benchmark number for either, because the public leaderboards we checked were too unsettled to rank them honestly. What the documentation does show:

  • Claude Code has the more visible undo: the rewind menu, with the clear caveats above. Its instructions system goes deep too, with a main file, optional rules that only load for matching files, and imports. It also has a desktop app if you’d rather not use a terminal at all.
  • Codex is built around the ChatGPT account you may already have. Its page highlights codex exec for running a task from a script or a CI pipeline, codex cloud for sending work to run in the cloud and applying the result later, and codex --search for live web search on tasks that need current docs. It also has an IDE extension and a desktop app.

That is a guide to where each company put its effort, not a verdict on whose results are better. The only way to know is to give both the same small task on your own project and compare the diffs.

Can you use both?

Yes, and it costs little to try. A simple way to test: put your project’s rules in AGENTS.md, add the @AGENTS.md line to CLAUDE.md, and run the same small, low-risk task in each (for example, “add a test for this function”). Compare what they changed, how much they asked you, and how many tries it took. Keep the one that fits how you work, or use each where it’s stronger.

One rule if you run both on the same project: don’t let them work at the same time on the same files. Two agents editing one folder step on each other, and a rewind can’t sort that out. Finish one task, commit, then start the other.

Let the AI for Coders tool pick

If you’d rather not guess, our free AI for Coders tool asks a few questions about how you work and what you’re building. It recommends the assistant that fits, with the install command for your operating system and a starter rules file. Free, instant, no sign-up. Not sure what an agent even is? Read What is an AI agent first, then come back and run both on one small task.

Keep reading

Frequent questions

Is Codex included with ChatGPT Plus? +

Yes. OpenAI's Codex pricing page lists Codex on the web, in the CLI and in the IDE extension as part of Plus, which is $20 a month. Free, Go ($8) and Pro (from $100) are listed too. Free and Go are pitched at quick, lightweight tasks, and the model named for them is for the desktop app, so check what your own plan shows before you count on the CLI.

Which is better for beginners, Claude Code or Codex? +

Neither is a gentler tool. Both run in a terminal, and both can edit your files and run commands. So start with the one your account already covers: a ChatGPT plan points you to Codex, a Claude Pro or Max plan points you to Claude Code. Whichever you choose, put the project in Git first, so you can undo what the AI changed.

Do Claude Code and Codex use the same instructions file? +

Nearly. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and, if your project has no CLAUDE.md, it reads AGENTS.md instead. If you already keep both files, put the line @AGENTS.md at the top of CLAUDE.md so Claude Code reads your one shared file. Anthropic's docs describe this setup.

Which is cheaper, Claude Code or Codex? +

Codex has the lower way in: it is listed on a free ChatGPT plan and on Go at $8 a month, while Claude Code has no free plan. At the paid entry level they match, with Plus and Claude Pro both at $20 a month. The honest comparison is usage: Claude Code shares its allowance with Claude chat, Codex shares with ChatGPT Work, and neither company promises a fixed number of tasks. Check your usage page after a week.

Set location

Tunes each tool to where you are. Stays on this device.

Set your AI

Which AI do you use?

Not sure? Help me choose →