There are three real ways to connect Claude Code and Codex: a shared file, a message bus, or a live link. Shared notes in AGENTS.md or CLAUDE.md are free and simple but manual. Message buses like MCP Agent Mail and Agent Relay let agents send each other explicit messages, with setup per agent. Claude Code's own agent teams and cross-session messaging only connect Claude sessions. Synapse links the Claude Code and Codex sessions already running on your Mac, so one sees the other's recent conversation on every prompt, and they can message each other. Pick by how much setup you will tolerate and whether you need push, history or file locks.
The problem
A common 2026 setup: Claude Code implements a feature while Codex reviews it, or Codex digs into a bug while Claude Code works on the API next to it. Both are good. Neither knows the other exists.
So you become the bus. You copy a stack trace from one terminal, paste it into the other, summarize what the reviewer said, and explain for the third time that the auth module changed. It works, but it costs attention, and it breaks the moment you forget to pass something on.
Getting Claude Code and Codex to talk comes down to three questions:
- Setup: do you have to register agents, launch them a special way, or change your repo?
- Delivery: does a message reach the other agent right away (push), or when it next looks (pull)?
- What gets shared: only what an agent chooses to write, or its actual recent conversation?
The approaches at a glance
| Approach | Claude Code to Codex | Setup | Delivery | Shares conversation automatically | Account or network |
|---|---|---|---|---|---|
| Copy and paste | Yes, by hand | None | You | No | None |
| Shared notes file (AGENTS.md, CLAUDE.md, a notes folder) | Yes | Write a convention | Pull, agent reads the file | No | None |
| Codex plugin for Claude Code | One way, Claude delegates to Codex | Install plugin | Request and response | No | Your Codex login |
| MCP Agent Mail | Yes | Each agent registers with a project key | Pull, optional unread reminders | No | Local server and token |
| Agent Relay | Yes | Broker launches agents, or MCP plus workspace key | Push for broker-launched agents, else pull | No | Hosted engine by default, self-hostable |
| claude-peers-mcp | No, Claude Code only | Special launch flags | Push via Claude channels | No | claude.ai login |
| Small bridges (agent-bridge, agent-talk and others) | Some | Varies | Varies | No | Mostly local |
| Ruflo dual mode | Yes, through shared memory | ruflo init --dual per project | Pull through tools | No | Claude login and API keys |
| Claude Code agent teams and cross-session messaging | No, Claude sessions only | Teams are an experimental flag | Delivered to a mailbox or session | No | Claude account |
| Synapse links | Yes | One install, no per-agent setup | Pull, on the next prompt | Yes, up to 8,000 characters per link | None, no network calls |
Facts about third-party tools come from their repos and docs, checked on 16 October 2026.
1. Copy and paste
The default. You read one agent's output and paste the useful part into the other.
- Good: zero setup, full control, nothing to trust.
- Bad: you are the bottleneck. You decide what is relevant, and you will miss things.
It is fine for one handoff a day. It is painful when two agents work side by side for hours.
2. Shared notes: AGENTS.md, CLAUDE.md or a notes folder
Codex reads AGENTS.md and Claude Code reads CLAUDE.md, so many people add a rule like "write your decisions to NOTES.md and read it before starting". Some tools formalize this. Conductor gives each workspace a .context folder, and Ruflo's dual mode writes both files for you.
- Good: free, works with any agent, leaves a written record.
- Bad: agents only see what someone wrote, and only when they decide to read it. Notes go stale. Two agents writing one file can collide.
This is a good baseline for long-lived decisions. It does not tell Codex what Claude Code did five minutes ago.
3. Delegation: calling Codex from Claude Code
OpenAI ships an official Claude Code plugin, openai/codex-plugin-cc, with commands like /codex:review and /codex:rescue that hand a task to Codex as a subagent. PAL MCP (formerly Zen MCP) similarly lets one CLI call others as tools.
- Good: official, simple, great for second opinions.
- Bad: one way. Claude asks, Codex answers, and that is it. The two are not peers working side by side.
4. MCP Agent Mail
MCP Agent Mail is "Gmail for your coding agents". It is an MCP server where each agent registers an identity, then sends threaded messages with subjects, acks and read receipts, stored in SQLite and a Git archive. It also has advisory file reservations with pre-commit guards, which is its standout feature.
- Good: durable, searchable history; file leases; built for swarms in one repo; Linux, macOS and Windows.
- Bad: each agent must register with a project key, usually via an AGENTS.md blurb. Delivery is pull, with optional hooks that remind about unread mail. Only what an agent writes is shared. The license is MIT plus a rider that excludes OpenAI and Anthropic, so it is not OSI approved.
5. Agent Relay
Agent Relay gives agents Slack-style channels, DMs, threads and typed actions. Its standout is push: for agents its broker launches, incoming messages are typed straight into the running Claude Code or Codex session.
- Good: real push, rich messaging, cross-machine fleets, Apache-2.0 and self-hostable.
- Bad: push only works for agents you launch through its broker. Agents you started yourself connect through MCP with a workspace key and poll. By default it talks to a hosted engine unless you self-host.
6. claude-peers-mcp and the small bridges
claude-peers-mcp lets Claude Code sessions on one machine find each other and send messages that arrive instantly through Claude Code channels. It gained a lot of stars quickly. But it is Claude Code only, needs sessions launched with --dangerously-skip-permissions and a development-channels flag, requires a claude.ai login, and has had no commits since April 2026.
A wave of smaller 2026 projects covers similar ground, including xhluca/agent-talk ("enables any coding agent to talk to each other") and rennerdo30/agent-bridge (Claude Code and Codex plugins). Most are single-maintainer projects with small communities. All of the ones we looked at share explicit messages only. None discover already-running agents or share conversation automatically.
7. Ruflo shared memory
Ruflo, formerly Claude Flow, is a large orchestration toolkit. npx ruflo init --dual writes CLAUDE.md and AGENTS.md and registers the same MCP server in both CLIs, so they read and write one shared memory namespace. It can also run fixed pipelines across Claude and Codex as headless workers it spawns.
- Good: persistent memory, routing, cost tracking, and a lot of features.
- Bad: it is built to spawn and orchestrate, not to connect sessions you already opened. It has a large surface, and an independent April 2026 audit questioned how many of its tools did real work. The maintainer said several findings were fixed in 3.6.x.
8. Claude Code agent teams and cross-session messaging
Claude Code has two built-in options. Agent teams (experimental, off by default) give a lead and teammates a shared task list with file-locked claiming and a mailbox. Cross-session messaging lets Claude list your other Claude Code sessions and send them text.
- Good: native, no install, a careful safety model, and cross-machine through Remote Control.
- Bad: Claude only. A Codex agent cannot join a team or receive a cross-session message. The docs say other tools must be exposed to Claude as an MCP server. Messages carry plain text, never the sender's conversation history.
If all your agents are Claude, start here.
9. Synapse links
Synapse is what we build, so weigh this section accordingly. It puts every live coding agent on your Mac on a canvas. Drag a line from agent A to agent B, and on every prompt B gets what A has said since last time, up to 8,000 characters per link. Links are directional, so draw both ways for a pair. Any two linked agents can also message each other, Claude Code to Codex included.
- Good: no per-agent setup. It finds Claude sessions from Claude Code's session registry and other CLIs by process scan, so it works with agents you already started in any terminal. Context flows without anyone writing a summary. MIT, no account, no network calls.
- Bad: pull only, so an idle agent does not wake up on a message. No file locks and no searchable message history. macOS first. Context is readable for Claude Code, Codex and Gemini CLI today. OpenCode, Cursor Agent, Amp and Copilot CLI get messages only. It is a new project with a small community. Multiplayer across machines is in development.
Synapse quick start
You need Node 18 or later.
git clone https://github.com/VishiATChoudhary/synapse && cd synapse && node install.mjs && npm start
node install.mjs wires an MCP server into each agent CLI it finds (backing up each config first), adds a prompt hook for Claude Code and Codex, and installs a /synapse skill. npm start opens the canvas at localhost:4747. Restart any agents that were already running so they pick up the hook. Codex asks once to trust it.
Link agents by dragging on the canvas, or from inside an agent:
synapse link codex-api
synapse send codex-api "I changed the auth middleware. Re-run your review on src/auth."
synapse inbox
You can also just tell Claude Code "link to the Codex agent and ask what it found". It has the same operations as MCP tools. When context or messages arrive, Claude Code and Codex print a line in the terminal so you can see it happened.
Which approach should you use?
- One handoff now and then: copy and paste, or a shared notes file.
- A second opinion from Codex inside Claude Code: the Codex plugin.
- All Claude, no other vendors: Claude Code agent teams or cross-session messaging.
- Many agents in one repo, needing file locks and an audit trail: MCP Agent Mail.
- Push delivery, channels, or agents on several machines: Agent Relay.
- Claude Code and Codex already open side by side, and you want each to know what the other is doing without setup: Synapse.
These combine. Synapse runs fine next to Agent Mail or a notes file, because it discovers agents wherever they run.
FAQ
Can Claude Code and Codex talk to each other natively?
No. Claude Code's cross-session messaging and agent teams only connect Claude Code sessions, and Codex has no built-in link to Claude Code. OpenAI's Claude Code plugin lets Claude delegate tasks to Codex one way. For two-way messaging you need a third-party tool such as Synapse, MCP Agent Mail or Agent Relay.
How do I share context between Claude Code and Codex?
The simplest way is a shared notes file that both read, such as AGENTS.md and CLAUDE.md. For automatic sharing, Synapse links inject one agent's recent conversation into the other's next prompt, up to 8,000 characters per link. Message tools like MCP Agent Mail share only what an agent writes.
Can Claude Code send a message to a running Codex session?
Yes, with a tool. Synapse delivers it on Codex's next prompt. Agent Relay types it straight into the session if its broker launched Codex. MCP Agent Mail delivers it when Codex checks its inbox.
Does Codex support Claude Code agent teams?
No. Claude Code agent teams and cross-session messaging require every participant to be a Claude Code session. Anthropic's docs say other tools must be exposed to Claude as an MCP server.
Which tool pushes messages into a live agent session?
Agent Relay pushes into agents its broker launched, and claude-peers-mcp pushes into Claude Code sessions started with special flags. Synapse and MCP Agent Mail are pull based. Synapse delivers on the next prompt, and an idle agent does not wake up.
Is there a free, local way to connect Claude Code and Codex?
Yes. A shared notes file is free and local. Synapse is MIT licensed, needs no account and makes no network calls. MCP Agent Mail also runs locally, under an MIT license with an extra rider.