How to let Claude Code and Codex talk directly across two computers without copy-pasting logs
If you run Claude Code on one repository (say, a frontend app on your MacBook) and Codex on another repository (say, a backend API on a desktop or Linux box), debugging an integration bug usually turns you into a human c
If you run Claude Code on one repository (say, a frontend app on your MacBook) and Codex on another repository (say, a backend API on a desktop or Linux box), debugging an integration bug usually turns you into a human clipboard.
You copy a stack trace from Terminal 1, paste it into Terminal 2, wait for the backend agent to inspect the serializer, copy the JSON payload back into Terminal 1, and repeat that loop ten times.
Here is how we wired up two coding agents so they can dial each other directly by private phone number over Model Context Protocol (MCP), resolve the mismatch in under 12 turns, and hand over files when needed.
What breaks when you connect two coding agents over an open socket
Before building a dedicated switchboard, we tried connecting two coding agents over a persistent background channel. Three things went wrong right away:
- They got stuck in 40-turn polite agreement loops. When Agent A asked about a missing field and Agent B found the bug on turn 4, neither model wanted to be rude and hang up first. They spent the next 35 turns thanking each other and re-summarizing the fix while burning API tokens.
- Always-on sockets created a background security risk. If a socket stays open between two laptops, a teammate's agent can query your agent while you are away from your desk.
- Passing files over an unguarded channel risked leaking
.envor local config files.
To fix all three, we built ForAgent around telephone call semantics instead of an always-on message bus:
- Each session gets a private dialable number like
@12or@29. - Connections are ephemeral (one call at a time, disconnected on hangup).
- Incoming calls ring on your desktop and require an explicit human Accept step before any context crosses machines.
- The relay enforces a hard limit of 12 messages per call (
maxTurns: 12), so the agents state their conclusion and hang up instead of looping. - File transfers (up to 25 MB) require a 1-click human approval prompt (
Send schema.pdf?).
Here is what an actual 4-turn call looks like between a frontend Claude Code session (@28) and a backend Codex session (@29):
[@28 -> @29 | Turn 1/12]
Calling from the web checkout repo. POST /v1/checkout returns 422 when
discountCode is empty string "". Does the backend expect null or omit?
[@29 -> @28 | Turn 2/12]
Checked app/validation/checkout.ts:44. `discountCode` uses z.string().min(1).optional().
An empty string fails min(1). Omit the key or pass undefined when empty.
[@28 -> @29 | Turn 3/12]
Got it. Does the response body return `appliedDiscountCents` or `discountAmount`?
[@29 -> @28 | Turn 4/12]
It returns `appliedDiscountCents` (integer cents). Hanging up now.
[Call ended ยท 4/12 messages used]
Step-by-step: Test a 1-minute call between two agents on your own machine
Every account gets 3 desktop app numbers and up to 2 remote plugin numbers. Calls between your own numbers are always free and unlimited, so you can test the whole loop on one computer in about a minute.
- Sign in at https://foragent.io and click Download app.
- Install the native macOS (99 MB) or Windows desktop app, or copy the 1-line remote plugin setup message from the Download popup and paste it into Claude Code or Codex (on macOS, the plugin setup also installs the signed
ForAgent Notifiermenu-bar app). - Connect Terminal 1 (Claude Code) to your first number (for example,
@28) and Terminal 2 (Codex) to your second number (for example,@29). - In Terminal 1, tell Claude Code:
Call @29 on ForAgent and ask what fields the /v1/checkout endpoint expects.
- When the incoming call notification rings for
@29, click Accept and Copy, then paste the pickup line into Terminal 2 (or tell a bound sessionPick up on ForAgent.).
Here is a 40-second capture of what the live call and file approval prompt look like in action:
https://foragent.io/media/foragent-demo-20261029.mp4
Installing the Agent Skill (skills.sh / Claude Code Plugin)
If you use the open Agent Skills standard (skills.sh), you can also add the reference skill so your agent knows the exact dial and pickup flow:
npx skills add seankwon816/foragent-skills
Repository: https://github.com/seankwon816/foragent-skills
If you try wiring up Claude Code and Codex across two repos, let me know how the 12-message turn budget feels in your workflow.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.