Crayon drawing of a red stick-figure robot and a blue stick-figure robot each holding one end of a long paper checklist, with several boxes ticked in green.

Yes, you can use Codex and Claude Code together, and there are three ways to connect them: OpenAI's Codex plugin for Claude Code, having either agent run the other's CLI, or one shared workspace both agents load. Underneath all three, keep one AGENTS.md in the repo, since Codex reads it by default and Claude Code reads it whenever there's no CLAUDE.md above it. We ran both on the same repos until recently, before moving all of our coding to Claude Code, so this post has the docs and what actually happened. Docs checked 2026-10-21.

How do you use Codex and Claude Code together?

Run both on the same repo with one shared AGENTS.md, then pick how they reach each other:

  1. The Codex plugin. Claude Code calls Codex through /codex:review, /codex:rescue and /codex:transfer, covered below.
  2. Each other's CLI. Ask Claude Code to run codex exec "<task>", Codex's mode for running from scripts, which starts in a read-only sandbox (Codex docs). Or ask Codex to run claude -p "<task>", Claude Code's non-interactive mode, where anything needing approval is denied unless you allow it with --allowedTools (Claude Code docs). Each call starts fresh, so put what the other agent needs in the prompt or a file.
  3. A shared workspace that holds the plan, tasks and handoffs both agents load. That's the last section.

Both edit the same files and nothing stops you switching between them. The friction is everything around the code: each tool has its own instruction file, its own memory, its own MCP config and its own session history. A common split is Claude Code writing and Codex reviewing, which is what /codex:review is for, and plenty of people switch when one hits a usage limit. The complaint in this Codex discussion is the one everyone has: "tired of keeping project context in two places." The side-by-side of the two tools, and which one we'd pick today, is in Claude Code vs Codex.

What we learned running both

Until recently we had Codex and Claude Code on the same repos, and the setup that held up was boring: one AGENTS.md per directory with the rules, and everything that wasn't a rule, meaning the plan, the open tasks and the handoff notes, in a Tokenrip workspace that both agents loaded first. Our CLAUDE.md files are the real ones and the AGENTS.md next to each is a symlink to it, so there was never a second copy to drift. We never trusted either tool's built-in memory to carry context to the other, and we turned auto memory off in both; Claude Code memory has that story.

What we didn't expect was how it ended. The two-tool setup didn't break; it just stopped earning its keep. Once Opus 5.5 shipped the gap in code quality got wide enough, especially on front-end work, that handing a task to Codex meant redoing it in Claude Code, and the usage-limit juggling wasn't worth that. So today Claude Code writes all of our code and the Codex side of the setup sits unused until a new OpenAI model changes the math. The workspace half of the setup outlived the Codex half, because our Grok Bots and ChatGPT read the same one.

Do Codex and Claude Code read the same instruction file?

Yes, if you use AGENTS.md. Codex reads it by default, and Claude Code (v2.1.277 or later) reads it as your project instructions when there's no CLAUDE.md.

  • Codex reads ~/.codex/AGENTS.md (or AGENTS.override.md), then walks from the project root down to your current directory, taking at most one file per directory, nearest file winning, up to 32 KiB by default (Codex docs).
  • Claude Code reads AGENTS.md only when there's no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your working directory or above it. To read both, set Project instructions to claude-md-and-agents-md in /config, or put @AGENTS.md at the top of your CLAUDE.md (Claude Code docs).

One trap: adding a personal CLAUDE.local.md stops Claude Code reading AGENTS.md by default. And Codex won't read CLAUDE.md unless you add it to project_doc_fallback_filenames.

Can I import my Claude Code setup into Codex, or the reverse?

Yes, in both directions, as a copy made the moment you run it.

  • Into Claude Code: /import codex brings instruction files, MCP servers, commands, subagents and skills from Codex on your machine, appended to the matching CLAUDE.md (commands).
  • Into Codex: the desktop app can "Import instructions, settings, skills, plugins, projects, and recent work" from Claude Code, and the CLI's /import brings setup plus up to 50 chats from the last 30 days (import docs).

Neither is a sync. The one exception is Codex's desktop app, where Settings > Import can keep imported work updated from Claude Code. Memory stays separate either way: Claude Code's auto memory is "machine-local", Codex memories live under ~/.codex/memories/ and are off by default, and Codex's import can copy Claude Code project memories once but nothing keeps them aligned (Claude Code, Codex).

Is there a Codex plugin for Claude Code?

Yes. OpenAI publishes codex-plugin-cc to "use Codex from inside Claude Code for code reviews or to delegate tasks to Codex." Install it in a Claude Code session:

/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup

It adds /codex:review (a read-only review of uncommitted changes or a branch), /codex:rescue (hands a task to Codex) and /codex:transfer, which "creates a persistent Codex thread from the current Claude Code session" and prints a codex resume command. It needs a ChatGPT subscription (Free included) or an OpenAI API key, plus Node.js 18.18 or later, and runs your local Codex install with the same sign-in and config. The README describes no shared memory and no transfer back from Codex to Claude Code.

The other direction is partial. Claude Code can run as a local STDIO MCP server with claude mcp serve (docs), and Codex starts local STDIO servers from config.toml, but that exposes Claude Code's tools, not its memory or sessions.

What do Codex and Claude Code share natively?

What you need Codex Claude Code Shared?
Project rules AGENTS.md CLAUDE.md, or AGENTS.md when no CLAUDE.md Yes, with one AGENTS.md
Move setup across /import from Claude Code /import codex One-time copy
Call one from the other Receives work through the plugin /codex:review, /codex:rescue, /codex:transfer One direction
Learned memory Codex memories, local, off by default Auto memory, machine-local No
MCP servers config.toml ~/.claude.json or .mcp.json Two configs, same server works in both
Plans, tasks, handoffs Its own session history Its own session history No

For one person, one machine and one repo, files cover the last row: a PLAN.md with Goal, Open tasks and Handoff, and a line in AGENTS.md saying to read it first and update it before stopping. It breaks when two agents work at once, since nothing stops both taking the same task, when work spans repos, or when a teammate's agent or a chat assistant needs the plan before you push.

How we gave both one shared workspace

The workspace is the part of our setup that's still running. Any agent connected to it loads the same pinned decisions, files, open tasks and handoff notes, and an agent that starts a task holds it under a lease, so two agents never work the same one. When both tools were in play, Claude Code would write the plan, file the tasks and leave a handoff; Codex would load the workspace, take a task, do it in the repo and record the result; and Claude Code's next load showed what had changed. Repo rules stayed in AGENTS.md; the decisions that reached beyond one repo were pinned.

To connect either agent, paste this into it and it does the setup; you give an email address and a six-digit code. The first connected agent can hand the second a one-line code, so there's no second email. Codex by hand: add [mcp_servers.tokenrip] with url = "https://api.tokenrip.com/mcp" to ~/.codex/config.toml and run codex mcp login tokenrip; Codex picks Client ID Metadata Documents automatically when a server advertises them, and Tokenrip's does (Codex docs).

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

Related reading

Questions

Can I use Codex inside Claude Code?

Yes, through OpenAI's codex-plugin-cc. It adds /codex:review, /codex:rescue and /codex:transfer to Claude Code and runs your local Codex install with its own sign-in. It works in one direction only, Claude Code calling Codex.

How do I move a Claude Code session to Codex?

Run /codex:transfer from the plugin, which creates a Codex thread from the current session and prints a codex resume command. Or use the Codex CLI's /import, which brings up to 50 recent Claude Code chats from the last 30 days.

Can Codex and Claude Code share memory?

No. Claude Code auto memory and Codex memories are separate local stores. Codex's import can copy Claude Code project memories once, but nothing keeps them in sync.

Does 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. By default it ignores it.

Is running Codex and Claude Code together free?

Codex is included in ChatGPT Free on the desktop app, so the cheapest pairing is Codex on Free next to Claude Pro at $20 a month. Both on entry paid plans is $40 a month. Prices checked 2026-10-22.