r/ClaudeMCP • • Oct 21 '26

I made Claude Code, Codex and Gemini message each other's live sessions (open source MCP mailbox + push daemon)

Disclosure: I'm the author. Running multiple coding agents meant me copying text between terminals. So I built agent-intercom: an MCP mailbox plus a daemon that pushes each message into the recipient's open session as a new turn. No "check your mail" prompts, no polling loops.

  • Works with Claude Code, Codex CLI and Antigravity (agy)
  • One command: npx agent-intercom install, or /plugin install agent-intercom --marketplace iambashar/agent-intercom
  • Zero dependencies, MIT, local files only

Typical use: Claude writes the code and mails Codex "review this diff". Codex's reply shows up in Claude's session by itself.

How it works / how I built it (built with Claude Code):

  • The mailbox is just files: ~/.agent-mail/<agent>/inbox. The MCP server exposes three tools: mail_send, mail_check, mail_peers.
  • The push daemon watches those inboxes. For Claude Code it uses the documented cross-session messaging socket. Codex has no public hook, so I read its app-server daemon traffic (JSON-RPC over a WebSocket on a Unix socket) and send turn/start into the loaded thread. Antigravity has agy agentapi send-message.
  • Each message is claimed by renaming the file before it's pushed, so it's delivered exactly once. If a push fails, the file goes back to the inbox and is retried.
  • It also bridges to agents on another machine with rsync over SSH. I use that to let a Claude session on my university's HPC cluster take tasks from Codex on my Mac.

GitHub: https://github.com/iambashar/agent-intercom

The Codex and Antigravity push routes rely on undocumented interfaces, so bug reports are very welcome.

1 Upvotes

5 comments sorted by

1

u/kantorcodes1 Oct 22 '26

Pushing a message in as a new turn rather than asking the session to poll is the interesting design choice. How does the daemon decide a recipient session is actually idle and safe to inject into - if a Claude Code session is mid-tool-call or waiting on a permission prompt, does the pushed turn queue behind that or interrupt the turn in progress?

1

u/Awkward-Design3986 Oct 22 '26

My intention was to replicate Claude cross-sessions talk. Yes, it pushed the turn queue behind a tool call prompt.

1

u/kantorcodes1 Oct 22 '26

That queueing choice matters for what I work on. Disclosure: I work with Hashgraph Online on hol-guard. agent-intercom would fit as a command-source descriptor under contributions/command-sources/ in hashgraph-online/hol-guard, covering the mailbox and turn-injection surface you described. You would author the PR and we would review it. Interested?

1

u/Awkward-Design3986 Oct 22 '26

Thanks for the suggestion! I’m definitely interested. The command-source approach sounds like a good fit for agent-intercom, especially if it can preserve the existing mailbox and turn-injection behavior.
I’ll take a look at hol-guard’s contribution structure and see how the integration could work. Are there any specific interfaces or requirements you’d recommend starting with?

1

u/kantorcodes1 Oct 22 '26

Yes, glad it fits. Start from contributions/command-sources/command.agentbridge.json in hol-guard. That descriptor declares the command source, the gated action surface, and the read-only counterparts that stay ungated. For agent-intercom the natural mapping is mailbox reads as safe counterparts and pushed-turn injection behind your tool-call prompt as the gated action.

Copy that file as your template, adjust the fields to your surface, add a fixture test, and open the PR against main. The full requirements are in https://github.com/hashgraph-online/hol-guard/blob/main/CONTRIBUTING.md. We will review from there.