Skip to content

Codex vs Claude Code

By Mari Luukkainen · 7 min read · Last updated

On this page

Codex and Claude Code are both coding agents: you describe a task, and they read your project, change files, run commands and report back. Codex comes from OpenAI and Claude Code from Anthropic. They differ in habits, plans and where they run, not in the basic idea.

This comparison covers workflow, the surfaces and plans of each as of 1 November 2026, a bug to give both, and one rules file that works for both. I have not written about using Codex, so what I say about it comes from OpenAI's documentation. For choosing between kinds of tools, start with the tool overview.

Ask AI about this pageChatGPTClaudePerplexityGoogle AI ModeGrok

What do Codex and Claude Code have in common?

  • You give a task in plain language.
  • Both read the project before they edit it.
  • Both can run commands, such as the tests, and use the output to decide what to do next.
  • Both read AGENTS.md from the project. Claude Code reads it when there is no CLAUDE.md, or imports it from CLAUDE.md with a line @AGENTS.md.
  • Both can return a change to review from the cloud, as a pull request or a branch.
  • Both can be wrong with confidence, so both need a review of the result.

Where do the two tools differ?

QuestionCodexClaude Code
VendorOpenAIAnthropic
Where does it run?Command line, IDE extension, the ChatGPT desktop and mobile apps, ChatGPT on the web, and Codex cloudTerminal, VS Code and JetBrains extensions, desktop app, web and mobile (cloud sessions), Slack, GitHub Actions
Plans that include itChatGPT Free, Go, Plus, Pro, Business, Edu and EnterpriseClaude Pro, Max, Ultra, Team and Enterprise, or a Console account with API credits. Not the free plan
Open source CLIYesNo, it is Anthropic's product
Rules fileAGENTS.mdCLAUDE.md, or AGENTS.md when there is no CLAUDE.md
Sign-inChatGPT accountClaude account, API key, Amazon Bedrock or Google Vertex AI

Sources: ChatGPT and Codex docs, Claude Code overview, Claude Code setup. How much each agent may do without asking is set differently in each. I have not compared Codex's approval settings, so read the Codex docs for them. Claude Code's permission modes are in what Claude Code is.

Prices (checked 1 November 2026)

PlanPrice per monthSource
ChatGPT Free (includes Codex)$0ChatGPT pricing docs
ChatGPT Go$8ChatGPT pricing docs
ChatGPT Plus$20ChatGPT pricing docs
ChatGPT Profrom $100 ($100, $200 or $500 tiers)ChatGPT pricing docs
Claude Pro (includes Claude Code)$20 ($17 billed annually)claude.com/pricing
Claude Max$100claude.com/pricing
Claude Ultra$200claude.com/pricing

The page does not list usage limits for Codex on each ChatGPT plan, so I have not compared them. The Claude limits and API costs are in Claude Code pricing.

How does a task look in each?

The same task, written once, works for both:

one prompt for both agents
Goal: visitors should be able to filter the product list by category.
Done means: a category dropdown above the list; selecting a category shows only matching products; the selected category is in the URL so the page can be shared.
Constraints: do not change the product data format. Add one test for the filter. Run the tests and the build before you finish.
Tell me which files you changed and anything you were unsure about.

The prompt follows the structure from my post on writing goals rather than task lists: the outcome, who it is for, what done looks like, the constraints, and which decisions are mine. I keep 167 of these written down for the Herizon codebase. A portable prompt lets you compare the agents fairly.

Differences show up in the second round: what each asks you, how it handles a failing test, whether it stops to confirm before a large change.

Meet the New Codex CLI · OpenAI

One AGENTS.md for both

Write the rules in AGENTS.md, which Codex reads. For Claude Code, create a CLAUDE.md that contains one line:

CLAUDE.md
@AGENTS.md

Claude Code imports the file at the start of each session, so both agents follow the same rules (memory docs). A symlink is worse: Claude Code's edit tool refuses symlinks, and symlinks behave badly on Windows. Test it by asking at the start of a session: "Which instruction files did you read, and what rules do they contain?"

rules that help any agent
- Do not edit existing tests to make them pass. If a test looks wrong, tell me.
- Do not add dependencies without asking.
- Only touch files needed for this task.
- Show the output of the test and build commands before you say you are done.

What does the same bug look like in both tools?

Take a concrete bug: a checkout page shows a price of 1.005 as 1.00 instead of 1.01. In JavaScript, (1.005).toFixed(2) returns "1.00", because 1.005 is stored as slightly less than 1.005. The same happens with 2.675, which gives "2.67". Intl.NumberFormat with two fraction digits formats 1.005 as 1.01, so using toFixed in one place and Intl in another gives two different prices for the same amount.

bug report for either agent
Bug: on /checkout a price of 1.005 is displayed as 1.00. It should display 1.01.
Reproduce it with a failing test first. Then fix the formatting function and check every place that calls it.
Do not change how prices are stored in the database. Run the tests and the build, and show me the output.

What to check in the result, whichever tool produced it:

  • Is there a new test, and does it fail on the old code? Ask the tool to prove it by temporarily reverting the fix.
  • Did the fix change the formatting function, or only the one page?
  • Are other prices affected? Try 2.675 and 1.005, which are classic floating-point cases.
  • Did it change how prices are stored, which you told it not to do?

The lasting fix is to store money as integer cents (100 for $1.00) and format only for display. Ask the tool whether the project does that. If not, that is a separate task with its own prompt.

What goes wrong with coding agents in general?

  • The agent fixes the test instead of the code. Prompt: "Do not edit existing tests to make them pass. If a test looks wrong, tell me."
  • It adds a package you did not ask for. Prompt: "Do not add dependencies without asking."
  • It changes unrelated files while it is there. Prompt: "Only touch files needed for this task."
  • It declares success without running anything. Prompt: "Show the output of the test and build commands."

Put the four sentences in AGENTS.md once.

How should you review a cloud agent's pull request?

A cloud agent returns a finished change, not a conversation. You cannot stop it midway, so the task description carries more weight, and your review carries more of the safety. Claude Code on the web and Codex cloud both work this way.

  1. Read the summary and compare it with your task's "done" criteria.
  2. Open the file list. Question anything you did not expect.
  3. Check out the branch and run the tests yourself.
  4. Run the app and try the case from the bug report.
  5. Search the diff for new dependencies and for changes to tests.
Meet the all new Codex Cloud · OpenAI

Which should you choose?

Your situationLean towards
You already pay for ChatGPTCodex, because it is included in every ChatGPT plan including Free
You already pay for Claude Pro or MaxClaude Code
You want an open source CLICodex
You want to start a task and review a pull request laterEither: both have a cloud form
You want the agent in JetBrainsClaude Code has a JetBrains plugin; check Codex's IDE extension for your editor

The ecosystem you already pay for decides most of it. If it does not, run the prompt above in both on a throwaway project and keep the one whose diff you would merge faster. More comparisons: Cursor vs Claude Code, OpenCode vs Claude Code and the alternatives list.

Frequently asked questions

Can I use Codex and Claude Code on the same repository at the same time?

Yes, if they work on separate copies. Give each its own Git worktree and branch, so the two agents never edit the same files, and merge the branches after you review them.

Can one agent review the other's work?

Yes, and it is a good use of having both. The reviewer should not be the session that built the change. Ask the second agent for a review with no edits, then read its findings yourself.

Is there a free way to try Codex?

Codex is included in the ChatGPT Free plan, according to OpenAI's pricing documentation checked on 1 November 2026. Claude Code needs a paid Claude plan or API credits.

Next guideGitHub Copilot vs Claude Code →