Stop copy-pasting between coding agents.
relay lets Claude Code, Codex, Gemini and Cursor hand work to each other directly, in the same repo, with the context attached.
$ npm i -g relay-agents && relay init
Free · MIT · zero dependencies · no API keys
The problem
You became the clipboard.
Every second opinion means copying code out of one agent, pasting it into another, re-explaining the project, and pasting the answer back.
Without relay
~2 min, every timeWith relay
one sentence- Codex gets the task, your conversation, and the diff
- It works in the same repo, with its own tools
- Its answer lands back in your Claude session
- Follow-ups continue where it left off
How it works
One command. Then just ask.
relay is a tiny local MCP server. relay init plugs it into every agent on your machine, so any of them can reach the others.
Install once
relay finds every agent on your machine and connects them. Config files are backed up first.
Ask in plain words
From inside any agent, name another one and say what you want. No commands to learn.
Get the answer back
The other agent works in the same repo. Its reply comes straight back into your conversation.
No re-explaining
The context travels with the task.
The receiving agent gets a complete brief, built automatically from your conversation, your repo and the shared history between agents.
- Your conversation: the recent back-and-forth with the user, so the why travels too.
- Repo state: branch, changed files, recent commits, and the full diff for reviews.
- Shared history: what every agent already did and decided in this project.
- Memory: follow-ups resume the same session, so the agent remembers.
- Clear rules: reviews and questions are read-only; handoffs may edit files.
[relay] claude is handing this to you (codex). Kind: review. Project: ~/app ## Task Review the current uncommitted changes in this project, focusing on: auth. List concrete issues most severe first (file:line, why it matters, suggested fix). ## Recent conversation between the user and claude user: sessions randomly stay alive after logout claude: Found it in src/auth.ts. Fixed the expiry check, added refresh-token rotation in src/refresh.ts. user: ask codex to review this before I merge ## Repo state Branch: feat/session-refresh Changed files: M src/auth.ts M src/session.ts ?? src/refresh.ts Full diff: ```diff - if (session.exp < Date.now()) { + if (session.exp < Date.now() / 1000) { … ## Recent relay history in this project 14:02 codex → claude (handoff) task: Add refresh-token rotation reply: Done. Added rotateRefreshToken() in src/refresh.ts… ## Rules - Read-only: review the changes. Do not modify any files. - Your final message goes straight back to claude.
▸ claude → codex (handoff) · job 4bfb6a ~/app 13:22:03 relay ▸ claude → codex (handoff) 13:22:06 • I'll add sub(a, b), write tests and run them. 13:22:06 • Running rg --files; cat calc.py 13:22:06 └ ok 13:22:08 • Edited calc.py 13:22:08 • Added test_calc.py 13:22:09 • Running python3 -B test_calc.py 13:22:09 └ ok 13:22:10 • Added sub() and tests. All assertions pass. 13:22:11 relay ▸ done in 8s codex replied after 8s: Added `sub(a, b)` to calc.py and tests in test_calc.py. — job 4bfb6a · continue it yourself: codex resume 01a1b7e3…
Watch it. Steer it.
Nothing happens behind your back.
Every handoff is a real session in the other agent. Watch it live, keep working while it runs, or take it over.
- Watch live:
relay watchstreams every command and edit as it happens. - Your windows stay in sync: each message you send in Claude or Codex includes what the other agents did since.
- Take over anytime:
relay open codexopens that session in Codex so you can continue it yourself. - Know when it's done: a desktop notification when background work finishes.
Why it works
Built to disappear.
No new app, no new account, no new bill. relay just connects what you already have.
Your existing logins
relay runs the real CLIs, so it uses your current subscriptions. No API keys, no extra bills.
Full-power, still safe
The receiving agent edits files and runs your tests, inside its own sandbox.
Never blocked
Say “in the background” and keep working. Results arrive with your next message, plus a desktop notification.
No loops
An agent started by relay can't hand work back again, so agents never ping-pong forever.
Local only
No server, no telemetry. The shared history lives in ~/.relay on your machine.
Zero dependencies
One small Node package. Installs in a second, nothing to keep updated.
FAQ
Questions
Does it cost anything?
No. relay is free and open source, and it runs the agent CLIs you already pay for, with your existing logins. There are no API keys and no extra usage beyond the agent work itself.
Is it safe to let one agent drive another?
Each agent keeps its own permissions and sandbox. Reviews and questions are read-only. Handoffs can edit files and run commands inside the project: Codex in its workspace-write sandbox, Claude Code inside its OS sandbox (writes limited to the project, network limited to package registries). An agent started by relay can't start another one, so nothing loops.
Where does my code go?
Only to the agents you already use, the same way it would if you pasted it in yourself. relay has no server. The shared history is a local file in ~/.relay.
Which agents are supported?
Claude Code, Codex, Gemini CLI and Cursor can all call relay and receive work (Cursor through cursor-agent). Any other CLI agent can receive work with one line in ~/.relay/agents.json.
How do I remove it?
Run relay uninstall. It removes relay from every agent's config. The original config files are kept as *.relay-backup.
Put the clipboard down.
Set up in under a minute. Works with the agents you already have.
$ npm i -g relay-agents && relay init