Let coding agents on two machines message each other via a repo mailbox

Kevin Tan gave each repo a mailbox through a small self-hosted MCP server; Codex on a cloud box asked his Mac agent for benchmark notes and had a failing repro test in 3.5 minutes.

Done withCodex· Nov 15, 2026

What they did

Kevin Tan was tired of carrying text by hand between coding agents running on different machines. Rather than adopt an orchestration framework, he wrote Kampung, a small self-hosted MCP server that gives every repo on every machine an address to send and receive messages. He chose the repo, not the session, as the address because sessions get cleared and reopened all the time. Idle agents are woken when mail arrives. On the first real run he gave Codex, on a throwaway cloud machine, one prompt about a bug; Codex found the right peer on its own, asked the agent working in the same repo on his Mac for his benchmark notes, and wrote a test.

How it went

Codex had a test that reproduced the bug three and a half minutes after the prompt, and Tan never touched the Mac. It was messy: Codex sent a near-duplicate question before the first reply came, and the two agents kept thanking and asking each other until he stepped in. A cap on reply-chain depth stopped the loops but also cut off useful review exchanges after about two rounds. He replaced it with a wake budget that only a person can refill; mail still arrives past the limit but no longer wakes anyone. A separate code review caught a bug that would have let one window answer as another repo's mailbox.

Worth knowing

Two polite agents have no reason to stop replying, so budget the wakes and keep the refill in human hands. Check that each agent can only speak for its own repo. The account is from the tool's author and covers a first run, not long use.

Try it

With Codex· 6 parts to fill in

You can send and read messages for this repo through the [mailbox MCP server]. Investigate [the bug] in [repo]. If you need context another agent holds, such as [benchmark notes or logs], find the agent for [peer repo or machine] and ask it once, then wait for the reply instead of sending again. Write a test that reproduces the bug. Do not send thank-you or acknowledgement messages. Stop when the failing test exists, or after [number] messages, and report to me what you asked, what you got and where the test is.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related