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:
- The Codex plugin. Claude Code calls Codex through
/codex:review,/codex:rescueand/codex:transfer, covered below. - 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 runclaude -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. - 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(orAGENTS.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.mdonly when there's noCLAUDE.md,.claude/CLAUDE.mdorCLAUDE.local.mdin your working directory or above it. To read both, set Project instructions toclaude-md-and-agents-mdin/config, or put@AGENTS.mdat the top of yourCLAUDE.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 codexbrings instruction files, MCP servers, commands, subagents and skills from Codex on your machine, appended to the matchingCLAUDE.md(commands). - Into Codex: the desktop app can "Import instructions, settings, skills, plugins, projects, and recent work" from Claude Code, and the CLI's
/importbrings 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.