Skip to content New: the Claude Skills catalog — what each skill does and how to install it →
CMP-05

Claude Code

Anthropic's coding agent. Runs Claude models in terminal, IDE, desktop, web.

VS
rev. 10/2026

Codex

OpenAI's coding agent. Runs GPT-6 models in CLI, IDE, ChatGPT app, cloud.

CMP-05 · Compare · 05 · rev. 10/2026

Claude Code vs Codex: which coding agent to pick

Codex vs Claude Code in brief: Codex comes with every ChatGPT plan, including Free, and its CLI is open source. Claude Code starts at Claude Pro and runs Anthropic's Claude models. Both read your repo, edit files, run commands and plug into GitHub and Slack.

Cheapest plan with itChatGPT Free (Codex)
Free planCodex only
Open-source CLICodex (Apache-2.0)
CheckedOct 2026
Short answerPick Codex if you want to start free, pay less, or read and fork the CLI source. Pick Claude Code if you already pay for Claude, prefer Claude models, or want cloud routines next to GitHub Actions and GitLab CI/CD.

Codex vs Claude Code is a choice between the two agents the big chat vendors ship for developers. Each one reads a repository, plans a change, edits files, runs commands and can open pull requests. The main differences are which subscription you need, which models run underneath, and where each one can live outside the terminal. This page compares them on facts from Anthropic's and OpenAI's own pages, checked in October 2026.

Short verdict: who should pick which

  • You want to try an agent for free: Codex. OpenAI includes Codex, with limited usage, on ChatGPT Free and Go. Claude's free plan does not include Claude Code.
  • You want the lowest monthly cost: Codex on ChatGPT Go at $8. Claude Code starts with Claude Pro at $17 a month billed annually or $20 monthly.
  • You want to read or change the agent's source: Codex. Its CLI repository is licensed Apache-2.0. Claude Code's repository license reserves all rights to Anthropic.
  • You use JetBrains IDEs or Xcode: both work there. Claude Code has its own JetBrains plugin. OpenAI's IDE docs say JetBrains IDEs and Xcode offer Codex through their own integrations, while the Codex extension covers VS Code, Cursor and Windsurf.
  • You want the agent in team tools: both reach GitHub and Slack. Claude Code has cloud routines, Slack mentions that return a pull request, GitHub Actions and GitLab CI/CD. Codex has a GitHub Action, GitLab merge request review in beta, and automatic code review and Slack in the cloud from Plus.
  • You already pay for one chat plan: use the agent that comes with it. Both plans include a chat app as well.

Feature table, from the vendors' own pages

Feature (Oct 2026)Claude CodeCodex
On the free planNoYes, limited: GPT-6 Luna in the desktop app, subject to rollout
Cheapest plan that includes itClaude Pro, $17/month annual or $20 monthlyChatGPT Free ($0); Go, $8/month
Cloud tasksClaude Code on the web, cloud routinesCodex Cloud, on Plus, Pro, Business, Enterprise and Edu
ModelsClaude Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 4.5GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, GPT-6 Luna
TerminalYes, macOS, Linux, WSL, WindowsYes, macOS, Linux, Windows
IDEVS Code, Cursor, JetBrainsVS Code, Cursor, Windsurf; JetBrains and Xcode through their own integrations
Desktop and mobileClaude desktop app; Claude app on iOS and AndroidChatGPT desktop app; iOS on Plus
Team toolsSlack, GitHub Actions, GitLab CI/CD, GitHub Code ReviewAutomatic code review and Slack on Plus; GitHub Action; GitLab review (beta)
Project instructionsCLAUDE.md, and it can read AGENTS.mdAGENTS.md
ExtensionsMCP, skills, hooks, subagents, Agent SDKMCP, skills and plugins, Codex SDK
Open-source CLINo, all rights reservedYes, Apache-2.0
Use with an API keyYes, Anthropic Console accountYes, CLI, SDK and IDE only, no cloud features

Which is better for writing, coding, research and images

Coding

Both agents do the same core loop: read, plan, edit, run, fix. Which one writes better code for you depends more on the model and your repo than on the tool, and neither vendor publishes a head-to-head we could quote. What we can compare is limits. OpenAI publishes estimates for local Codex messages per five-hour window on Plus: 5 to 45 with GPT-6 Astra, 15 to 160 with GPT-6.1 Sol and 350 to 3,000 with GPT-6 Luna. Pro plans currently have no five-hour limit. Anthropic describes usage in multiples instead: Max gives 5x or 20x the usage of Pro. On the Claude side, our Opus vs Sonnet comparison helps you pick the model inside Claude Code.

Writing and docs

Both write commit messages, pull request text and docs from your diff. Claude Code works with git directly: it stages changes, writes commit messages, creates branches and opens pull requests. Outside code, each subscription also includes its chat app for longer writing. For a broader view, see ChatGPT vs Claude.

Research in a codebase

Both can pull outside context over MCP. Claude Code's docs give examples such as design docs in Google Drive, tickets in Jira and data from Slack. On context size, Claude Fable 5.1, Opus 5.5 and Sonnet 5.5 list 1M tokens; OpenAI lists 1.05M tokens for GPT-6 models in the API.

Images

Neither is an image tool, but both models read images, so you can paste a screenshot of a broken layout. OpenAI's pricing page also mentions image generations inside ChatGPT and Codex usage, which use included limits faster than text.

Setting up each one

Both install in one line and sign in with the chat account you already have.

  1. Claude Code: on macOS, Linux or WSL, Anthropic's docs give curl -fsSL https://claude.ai/install.sh | bash; Homebrew users can run brew install --cask claude-code, and Windows has PowerShell and WinGet options. Then open a project folder and run claude. You are asked to log in on first use.
  2. Codex: OpenAI's README lists npm install -g @openai/codex, Homebrew, a shell installer and direct downloads. Run codex in a project and sign in with your ChatGPT account or an API key.
  3. Project rules: put your build and test commands in an AGENTS.md file at the repo root. Codex reads it before any work, and Claude Code can read it too, so you can switch agents without rewriting instructions.
  4. Effort: Anthropic says Claude Code defaults to medium effort; raise it for hard refactors and lower it for routine edits.

If you also want an editor with its own agent and a choice of models, compare Claude Code vs Cursor, and browse our AI coding tools list for the rest.

Same prompt in both: run it and compare

Run each prompt on a fresh branch of the same repo, once in each agent. We do not print outputs, because they depend on your code. Compare the plan each agent proposes, the size of the diff and how many corrections you had to make.

Try it in both
Find the cause of this bug: [describe the symptom or paste the error]. Reproduce it first with a failing test. Then fix the smallest amount of code that makes the test pass, run the full test suite, and summarize what changed and why in three bullet points.
Try it in both
Review the changes on this branch against [main branch name]. List problems in order of severity: bugs, security issues, missing tests, then style. For each one give the file, the line, and a one-sentence fix. Do not edit any files.

The second prompt is a quick way to see which agent stays inside the scope you set. For more Claude Code tasks, see our Claude Code prompts and the Claude Code cheat sheet.

Pricing, plan by plan

TierClaude Code (via Claude plans)Codex (via ChatGPT plans)
FreeNot includedFree, $0
EntryNoneGo, $8/month
StandardPro, $20 monthly or $17/month annualPlus, $20/month
Heavy useMax, from $100/month (5x or 20x Pro)Pro, $100, $200 or $500/month
TeamsTeam Standard, $20/seat annual or $25 monthly; Premium, $100 or $125Business, $20/user annual or $25 monthly

US prices before tax. Both can also run on pay-as-you-go API keys. Anthropic lists Sonnet 5.5 at $2 input and $10 output per million tokens and Opus 5.5 at $4 and $20. OpenAI lists GPT-6.1 Sol at $2 and $10 and GPT-6 Astra at $10 and $50. On ChatGPT Pro, OpenAI paused new sign-ups for the $200 tier on September 10, 2026.

FAQ

Is Codex free?

Codex is included on ChatGPT Free and Go with limited usage; OpenAI lists GPT-6 Luna in the desktop app for those plans, subject to rollout. Its pricing page lists Codex on the web, in the CLI, in the IDE extension and on iOS from Plus.

Is Claude Code better than Codex?

Neither vendor publishes a direct comparison we could quote. Both reach the terminal, the main IDEs, GitHub and Slack. Codex is cheaper to start and its CLI is open source; Claude Code runs Claude models and comes with a Claude plan. Run the prompts above on your own repo to decide.

Can Claude Code and Codex share project rules?

Yes. Codex reads AGENTS.md, and Anthropic's docs say Claude Code can read AGENTS.md on its own or alongside CLAUDE.md.

Is Codex open source?

The Codex CLI repository on GitHub is licensed Apache-2.0. Claude Code's repository license reserves all rights to Anthropic.

Which models do Codex and Claude Code use?

Codex runs OpenAI's GPT-6 family: GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol and GPT-6 Luna, and OpenAI lists GPT-6 Luna at standard speed in the desktop app for Free and Go. Claude Code runs Claude models, with Opus 5.5 and Sonnet 5.5 as the current mainstream pair and Fable 5.1 above them.

Sources

  1. Claude Code overview — Claude Code Docs, accessed October 2026
  2. Claude Code license — Anthropic on GitHub, accessed October 2026
  3. Plans and pricing — Claude, accessed October 2026
  4. Models overview — Claude Docs, accessed October 2026
  5. Introducing Claude Sonnet 5.5 — Anthropic, accessed October 2026
  6. ChatGPT and Codex pricing — OpenAI, accessed October 2026
  7. Using Codex with your ChatGPT plan — OpenAI Help Center, accessed October 2026
  8. What is ChatGPT Plus? — OpenAI Help Center, accessed October 2026
  9. Codex IDE extension — OpenAI, accessed October 2026
  10. Codex GitHub Action — OpenAI, accessed October 2026
  11. Review GitLab merge requests with Codex — OpenAI, accessed October 2026
  12. Custom instructions with AGENTS.md — OpenAI Codex docs, accessed October 2026
  13. Codex CLI repository — OpenAI on GitHub, accessed October 2026
  14. Models — OpenAI API documentation, accessed October 2026
  15. API pricing — OpenAI, accessed October 2026
Weekly

New prompts in your inbox

One email a week: the best new prompts and one short guide. Unsubscribe any time.