Guide14 min read

Nikos Dritsakos, Founder

Codex vs Claude Code (2026): which to use, and how to run both on one team

What each one is good at, what each remembers between sessions, and how to keep a split team on the same context.

On this page
  1. Short answer
  2. Codex vs Claude Code at a glance
  3. How Codex and Claude Code work differently
  4. CLAUDE.md vs AGENTS.md
  5. What each one remembers between sessions
  6. Pricing
  7. Running Claude Code and Codex on one team
  8. How Glen fits
  9. Frequently asked questions

Claude Code and Codex are two of the most capable AI coding agents available in 2026. Both can read your codebase, write and test code, work locally, and run tasks in the cloud. Both have persistent memory, and both are increasingly capable of doing the same kinds of work.

Which leaves most teams asking, "which one should we use?"

The answer depends less on what either agent can do and more on how you prefer to work. Claude Code and Codex take different approaches to developer workflows, permissions, parallelism, and context management.

But there's another question worth asking, especially if your engineering team uses both: what happens to everything these agents learn?

This comparison covers where Claude Code and Codex differ, what each remembers between sessions, and how to keep a team using both tools working from the same context.

Short answer

  • Pick Claude Code if you want to work alongside the agent: one task at a time, in your terminal or IDE, on your real filesystem, approving changes as they land.
  • Pick Codex if you'd rather hand work off. You write a scoped ticket, send it to a cloud sandbox, run several at once, and apply the diffs you like. It also reviews pull requests with @codex review.

Running both? Claude Code and Codex each keep their own memory on each developer's machine. Glen gives every agent on your team one shared memory, so what one learns, both know.

Codex vs Claude Code at a glance

The biggest difference is where the work happens and who's watching it. They're closest on price, and on one limit: natively, only checked-in files reach a teammate. Prices were checked November 9, 2026:

Claude CodeCodex
MakerAnthropicOpenAI
Where it runsTerminal, IDE, desktop app and web; local filesystem by defaultCLI, IDE, desktop app, web, plus cloud sandboxes
Default working styleInteractive, asks permission as it goesDelegated, parallel cloud tasks
Instruction fileCLAUDE.mdAGENTS.md
Built-in memoryAuto memory, on by defaultMemories, off by default
Shared with your teamOnly checked-in CLAUDE.mdOnly checked-in AGENTS.md
Entry pricePro, $20/moPlus, $20/mo (Free and Go also include Codex)
Team planTeam Standard, $20/seat/mo billed annuallyBusiness, $20/user/mo billed annually

How Codex and Claude Code work differently

Claude Code expects you in the loop. It runs in your terminal or IDE against the files on your disk, and the web app can run cloud sessions in parallel. It asks before it acts, and hands you the controls to steer: plan mode, subagents, hooks, skills, and checkpoints you can roll back with /rewind.

Say you're pulling a shared retry helper out of a large monorepo. It touches a few dozen call sites across three services. You'll want to read the plan before anything moves, stop the agent when it decides one service needs a different backoff, and rewind the moment an edit goes sideways. That's a Claude Code session (i.e. clear your afternoon).

Codex works locally too, in the CLI, IDE and desktop app, but it's built around the ticket. You describe the task, it runs in a cloud sandbox, and you apply the result locally when it's done. The win is that nothing waits on you (send off several tickets at once, and review the diffs when they come back).

Picture a backlog of eight small, well-specified issues: a missing index, a flaky test, two copy changes, or a deprecated API call. Each one goes out as its own cloud task. You come back to eight diffs, keep six, and rewrite the prompt on the other two.

  • Claude Code is best for work you want to watch: the refactor above, anything under src/billing/. Not ideal for a backlog you want cleared while you're in meetings.
  • Codex is best for scoped tickets you hand off and review as diffs. It's less suited to a change you'd rather steer turn by turn.

Tokens are the other difference people bring up. Morph's comparison, dated February 2026, reports Codex using fewer tokens than Claude Code on three matched tasks, attributed to community testers. The page publishes no method and no run count, so its numbers aren't repeated here, but you can treat it as directional evidence, and measure on your own repo before you budget around it.

CLAUDE.md vs AGENTS.md

CLAUDE.md is Claude Code's instruction file, and AGENTS.md is Codex's. Both load at session start, both belong in git, and checked-in copies are the only native way either tool's team guidance reaches a teammate.

Claude Code reads CLAUDE.md at four levels:

  • A managed policy file
  • Your user file at ~/.claude/CLAUDE.md
  • The project file at ./CLAUDE.md that you share through git
  • And a personal CLAUDE.local.md

Anthropic's guidance is to keep each file under 200 lines. Rules for part of the codebase go in .claude/rules/*.md, with optional paths frontmatter so a rule loads only for matching files.

Codex reads a global ~/.codex/AGENTS.md (or AGENTS.override.md), then one AGENTS.md per directory from the repo root down, per OpenAI's AGENTS.md guide. Total size is capped by project_doc_max_bytes, 32 KiB by default as of November 2026 (OpenAI's own example raises it to 65536).

The Claude Code memory docs now say it reads AGENTS.md on its own, from v2.1.277, when a repo has no CLAUDE.md. Add a CLAUDE.md and that stops: it reads only CLAUDE.md, and the memory docs say to import AGENTS.md from there. Codex can be pointed at other filenames with project_doc_fallback_filenames, but go the other way instead. Keep AGENTS.md canonical, since more agents read it, and have CLAUDE.md import it:

# CLAUDE.md
@AGENTS.md

## Claude Code only
Use plan mode for changes under src/billing/.

One file holds the shared rules. CLAUDE.md holds only what's specific to Claude Code.

The alternative is a symlink, ln -s AGENTS.md CLAUDE.md. It works on macOS and Linux. On Windows, git checks symlinks out as plain text files unless core.symlinks is enabled and the machine allows symlink creation, so a teammate there gets a CLAUDE.md containing the word "AGENTS.md" and nothing else. Technically an instruction file, but practically not a useful one. The import has no such failure mode (i.e. use the import).

What each one remembers between sessions

Both tools can learn from your sessions now, and neither shares what it learns. Claude Code's auto memory is on by default in local sessions. It writes a MEMORY.md index plus topic files and loads the first 200 lines or 25 KB of that index at the start of each session. Codex Memories stay off until you turn them on in settings, or set memories = true under [features] in config.toml.

The details, current in November 2026:

Claude CodeCodex
NameAuto memoryMemories
DefaultOn, in local sessionsOff
Stored in~/.claude/projects/<project>/memory/Under ~/.codex (memories_v2/ on fresh profiles)
Shared across machinesNo: "machine-local"No: settings apply "for the selected machine"
Vendor's caveatInstructions given only in chat are lost after /compactNot "the only source for rules that must always apply"

Look at the storage row again. Both paths sit under your home directory.

Neither built-in memory leaves the machine.

For one developer, that's a reasonable design, and both vendors are explicit about what follows from it. Anthropic says auto memory is machine-local and team guidance goes in the project CLAUDE.md. OpenAI says team guidance belongs in AGENTS.md, and memories shouldn't be the only place a must-follow rule lives.

When read side by side, the advice is the same: anything your teammates' agents need has to be written down, in a checked-in file, a doc or a tool an MCP server can reach, by a person, who remembered to do it.

So what your Claude Code session worked out on Monday is invisible to your own Codex session on Tuesday, and to everyone else's agents every day. A new hire picks this stuff up by sticking around. A coding agent on a split team starts each session knowing only what someone got around to writing down.

This Claude Code memory guide goes deeper on that side.

Pricing

Both start at $20 a month for an individual, and team seats start at $20 per seat per month, billed annually, on both. The differences sit at the edges: Codex has a free entry point, and the heavy-use tiers are shaped differently. Checked November 9, 2026, against the Claude and Codex pricing pages:

Claude CodeCodex
FreeNo Claude Code on FreeFree and Go ($8/mo) include Codex on GPT-6 Luna
Entry planPro, $20/mo ($17/mo billed annually)Plus, $20/mo, with cloud features
Heavy individual useMax $100 (5x Pro); Ultra $200 (10x Pro weekly, no 5-hour limit for verified accounts)Pro at $100, $200 or $500, currently no 5-hour limit
TeamStandard $20/seat/mo billed annually ($25 monthly); Premium $100 ($125); 2 to 150 seatsBusiness $20/user/mo billed annually ($25 monthly), 2+ users
Enterprise$20/seat/mo billed annually plus usage at API rates, 20-seat minimum, or contact salesContact sales
Pay per tokenAPI key at standard ratesAPI key works, without cloud features like GitHub review and Slack

Current models for Claude Code include:

  • Fable 5.2 (paid with usage credits on a Pro plan)
  • Opus 5.5
  • Sonnet 5.5
  • And Haiku 5.5

Current models for Codex include:

  • GPT-6.1 Sol
  • GPT-6.1 Terra
  • GPT-6 Astra
  • And GPT-6 Luna

Both vendors change plans often, and model names faster, so check the date before you budget.

Limits and pacing

Both vendors meter usage in a rolling five-hour window and a weekly window, and the weekly one is what people hit.

Claude Pro gets 1x, Max 5x and Ultra 10x weekly, with no five-hour limit on Ultra for verified accounts. On Team and Enterprise seats the allowance is shared with Claude chat and Cowork. Fable 5.2 on Pro is paid with usage credits; Max includes it up to half the weekly limit.

Codex Plus estimates 15 to 160 local messages per five hours on GPT-6.1 Sol and 350 to 3,000 on GPT-6 Luna, weekly limits "may also apply", and local messages and cloud tasks draw from one allowance.

It's worth noting that Codex Pro has no five-hour limit. When a Codex limit lands mid-turn, the agent finishes the turn, subject to fair use. Claude Code stops, and can wait for the reset and continue on its own. Both sell credit add-ons to keep going.

Running Claude Code and Codex on one team

Plenty of teams end up here without ever deciding to. One developer likes to steer, another likes to delegate, and nobody wants to standardize on the other person's tool. The setup that holds up:

  1. AGENTS.md is the source of truth, and CLAUDE.md imports it with @AGENTS.md. Shared rules get written once. Claude Code-only notes sit below the import.
  2. Path-scoped rules live in both formats. A rule for src/billing/ goes in .claude/rules/ with a paths match, and in a nested src/billing/AGENTS.md. Yes, that's duplication. Keep these rules short so the copies don't drift.
  3. Commit MCP config so every agent reaches the same tools. Claude Code reads a project .mcp.json; Codex defines servers under [mcp_servers] in config.toml. Check in what you can and document the rest in AGENTS.md. Glen's guides cover MCP setup in Claude Code and MCP setup in Codex.
  4. Decisions go into the repo. Both vendors say this. If it matters past today's session, it belongs in a checked-in file.

That covers rules, sure, but it doesn't cover everything else a session learns.

Say a teammate spends Tuesday in Codex chasing a flaky integration test. They find that the staging queue drops messages over 256 KB, try three fixes, reject two, and land the third. None of that reasoning makes it into AGENTS.md, because it's history, and AGENTS.md holds rules.

On Wednesday you open Claude Code to touch the same consumer. Your agent greps, reads, and confidently proposes the first fix your teammate already rejected.

Then somebody in Slack types "didn't we decide this already?"

The scenario might be made up, but the gap isn't.

Debugging lessons, rejected approaches and "why we did it this way" live in one person's local memory, on one machine, in one agent. A Claude Code session can't see what a teammate's Codex session learned yesterday. Neither can that teammate's own Claude Code session, which is a strange thing to say about the same person's laptop.

How Glen fits

Glen is a shared memory layer for coding agents. Plugin hooks record sessions from both Claude Code and Codex into one memory for your organization, and both agents get recall on every turn: context from the team's history, injected before the agent spends a turn on a wrong assumption. In other words, nobody has to remember to write anything down.

The Claude Code setup and Codex setup docs list what each hook does.

Recall arrives as one answer, and every fact carries a source: who said it, where, when. A language model writes that answer, so it can be wrong. Follow the citation before acting on it. Any other MCP client can search the same memory through Glen's MCP server.

We measured what memory is worth in Replaying 100 PRs: Codex 5.5 re-implemented a workspace's last 100 merged PRs, five runs per arm, mean reported, wall clock including hook round trips. For each PR, memory was rolled back to the morning it was first written, so the agent could not recall its own future.

  • Tokens: 29% fewer.
  • Wall clock: 21% faster, net of recall latency.
  • Quality: at parity or better.

That replay ran on Codex; we haven't published a Claude Code arm. It's our own replay (not an independent evaluation) and other repos will differ.

In short, Glen doesn't replace AGENTS.md or CLAUDE.md, and it was never meant to. When a decision in memory hardens into a rule, write it into the repo. It's built for two or more people running agents in the same codebase. A solo developer with a tidy CLAUDE.md, or a small team that writes its decisions down, may not need it. But teammates and their agents can find recorded sessions through search (Privacy Policy, section 4), and glen incognito keeps a session out of team memory.

Want to try giving both Claude Code and Codex the same memory?

Your first 15,000 memories are free, no credit card.

npx @tryglen/cli@latest install

Start free

Frequently asked questions

Is Codex better than Claude Code?

Not across the board. Claude Code fits interactive work in your local repo, where you want to watch the agent and step in mid-task. Codex fits well-scoped tickets handed to cloud sandboxes that run in parallel. Pick by working style, not by which model sounds smarter.

Can Claude Code read AGENTS.md?

Yes. The Claude Code memory docs say that from v2.1.277 it reads AGENTS.md when the repo has no CLAUDE.md. Once you add one, Claude Code reads only that, so add @AGENTS.md to your CLAUDE.md to import it and keep AGENTS.md as the single source of truth. A symlink also works, but Windows checkouts can turn it into a plain text file.

Do Codex memories sync across machines?

No. Codex's settings docs say Memories apply "for the selected machine," so what Codex learns on your laptop stays there. A second machine or a teammate's session starts without it. Anything that has to travel goes into a checked-in AGENTS.md.

Can Codex and Claude Code work on the same repo?

Yes. Keep AGENTS.md canonical, since Codex reads it natively, and have CLAUDE.md import it with @AGENTS.md so both tools load the same rules. Commit your MCP configuration too, so either agent reaches the same tools whichever one picks up the task.

Which is cheaper for a team?

Neither, at list price. Claude Code Team Standard and Codex Business both start at $20 per user a month billed annually, and $25 monthly, checked November 9, 2026. Costs split at the heavy-use tiers and in token consumption, which depends on how your team uses each agent.

Which is better, Codex Plus or Claude Pro?

Neither on price: both are $20 a month. What differs is what the $20 meters. Claude Pro gives Opus, Sonnet and Haiku, with Fable 5.2 paid by usage credits, in five-hour and weekly windows. Codex Plus gives GPT-6.1 Sol and GPT-6 Luna, an estimated 15 to 160 Sol messages per five hours, cloud tasks drawing from the same allowance, and a turn that finishes after the limit lands. Pick by working style, then by which weekly cap you would rather plan around.

Does either one share memory across a team?

No. Claude Code's auto memory is machine-local, and Codex Memories apply only to the machine where you turned them on. Both vendors tell teams to put shared guidance in checked-in CLAUDE.md or AGENTS.md files. Glen is a shared memory layer built for the reasoning those files leave out.

More field notes

Fix your agents’ amnesia.

Start on your own or with up to two teammates. Your first 15,000 memories are free, no credit card.

Start free