Crayon drawing of a tall blue stick-figure robot holding up a tidy drawing of a house, a short red robot holding a black scribble, and a child in the middle pointing at the blue robot.

We run both Codex and Claude Code at Tokenrip, but for writing code we've moved everything to Claude Code. Opus 5.5 reads a codebase better, ships front ends we can actually use, and it's faster than anything OpenAI has right now. Codex still has real advantages though: it's free to start, the CLI is open source, and it sandboxes by default. Below are the differences as the vendors' docs state them, which tool wins for which job, and the project that settled it for us.

What is the difference between Claude Code and Codex?

Same job, different stacks. Both read your repo, edit files and run commands, and both do it from a terminal, an IDE, a desktop app or the cloud. What differs is the account you need, the file each one reads for instructions, and the defaults for memory and sandboxing. From the vendors' docs, checked 2026-10-21:

Claude Code Codex
Models Claude, from Anthropic or a third-party provider OpenAI models, or local models through Ollama or LM Studio with --oss
Cheapest way in Claude Pro, $20 a month; not on the Free plan ChatGPT Free, desktop app only
Source code Closed, all rights reserved CLI is open source, Apache-2.0
Instruction file CLAUDE.md; reads AGENTS.md when no CLAUDE.md exists AGENTS.md; CLAUDE.md only if listed as a fallback
Learned memory Auto memory, on by default, per repo, machine-local Codex memories, off by default, in ~/.codex/memories/
Local sandbox Off by default; macOS, Linux, WSL2 On by default; macOS, Linux, Windows
Skills SKILL.md in .claude/skills/, Agent Skills open standard SKILL.md in .agents/skills, same standard
Import the other /import codex /import

Sources: Claude Code overview, memory, sandboxing, license; Codex pricing, AGENTS.md, memories, sandboxing, GitHub.

Which is cheaper, Claude Code or Codex?

Codex is cheaper to start, but from the first paid tier up they cost the same. Codex comes with ChatGPT Free and Go ($8 a month), desktop app only and subject to rollout, while Claude Code isn't on Claude's Free plan at all. ChatGPT Plus and Claude Pro are both $20 a month billed monthly, and both top individual plans start at $100 a month (ChatGPT Pro, Claude Max). Prices checked 2026-10-22 on Claude pricing and Codex pricing.

Past that, the cheaper tool is whichever one's usage limits you hit less often. Claude Code draws on the same pool as your Claude chats, and Codex publishes estimated messages per five hours by plan and model. Plenty of developers pay for both and switch when one runs dry, and we did too, until the quality gap made switching pointless.

Which one writes better code? What we found

Claude Code, and it's not even close. We ran Codex and Claude Code side by side until recently, but we've since stopped sending code to OpenAI's models at all. Opus 5.5 understands the codebase it's working in, makes fewer wrong edits, and it gets there faster. Astra and GPT Sol 6.1 were slow and disappointing on nearly everything we gave them, and they were worst at front-end work.

The project that settled it was a simple site that we figured was too small to need Opus 5.5, so we gave it to the OpenAI side to save some budget. That was a mistake. The front end came back unusable and we ended up rebuilding the whole thing with Opus.

Our read on why, and this is opinion: OpenAI went too wide this year with new products and features, and the frontier model paid for it. Astra is still good at image generation and presentation decks, and we use it for both, but for code we'll look again when a new OpenAI model ships.

Model quality moves with every release though, so check the date on anything you read, including this page.

Which should you pick?

Pick by what you already pay for and what you need on by default, and use the quality gap above as the tiebreaker:

If you want Lean toward Why
The best code and front ends today Claude Code Our experience above
A free way to start Codex Included in ChatGPT Free, desktop app only
To use the Claude plan you already pay for Claude Code Included in every paid Claude plan
A sandbox on by default Codex workspace-write is the default for local work
Memory that builds itself Claude Code Auto memory is on by default
An open-source harness or local models Codex Apache-2.0 CLI; --oss runs Ollama or LM Studio
Models from several vendors in one editor Cursor Anthropic, OpenAI and Google models

Cursor is the third name in most of these searches, and it differs on one axis: it's an editor that lets you pick models from several vendors (Cursor docs), so you can run Opus 5.5 inside it. It reads both AGENTS.md and CLAUDE.md (rules) and loads skills from both tools' folders (skills). Its docs don't describe any automatic memory though; see Cursor memory.

Can you use both on one repo?

Yes, and the setup is small. Keep the shared rules in one AGENTS.md, since Claude Code reads it when there's no CLAUDE.md, and if you need Claude-only rules, add a CLAUDE.md whose first line is @AGENTS.md (docs). Each tool imports the other's setup: /import codex in Claude Code (commands), /import in the Codex CLI (changelog). Neither import carries learned memory though, and nothing tells one tool what the other one just did. The three ways to connect them, including OpenAI's Codex plugin for Claude Code, are in Codex and Claude Code together.

What we do with both at Tokenrip

Claude Code writes the code and Astra makes the images and the decks. Both connect to the same Tokenrip workspace, so the pinned decisions, files, open tasks and handoff notes all live in one place that every agent reads first, and nobody has to re-explain the project to the second tool. That shared record is the piece neither vendor gives you, and it's the reason two agents are better than one. To connect an agent, paste this into it:

Connect me to Tokenrip. Fetch https://tokenrip.com/setup?ref=claude-code-vs-codex and follow it.

Related reading

Questions

Can Claude Code read AGENTS.md?

Yes, from v2.1.277, when there is no CLAUDE.md or CLAUDE.local.md in your working directory or above it. Otherwise import it with @AGENTS.md in your CLAUDE.md.

Can Codex read CLAUDE.md?

Only if you add CLAUDE.md to project_doc_fallback_filenames in config.toml, and only in directories with no AGENTS.md.

Do Claude Code and Codex share memory?

No. Claude Code auto memory and Codex memories are separate local stores on each machine, and neither tool's import copies them.

Can I move my setup between Claude Code and Codex?

Yes. Run /import codex in Claude Code, or /import in the Codex CLI to bring in your Claude Code setup. Both are one-time copies of instruction files, MCP servers and skills.

Is Codex open source? Is Claude Code?

The Codex CLI is open source under Apache-2.0. Claude Code is not: its GitHub repository states all rights reserved, with use subject to Anthropic's Commercial Terms.