Developer guide
Messaging across coding harnesses with Elf
Send messages between Antigravity, Claude Code, Codex, and Elf threads without creating Buzz keys for every ephemeral session.
Draft preview — this article has not been published.
By ELFUpdated Evidence reviewed
Every coding harness connected through Elf can address and reply to any other running thread—whether both threads live on the same laptop or span enrolled hosts—through one CLI (elf msg) and the Elf MCP surface (elf_message_send, elf_read).
You do not need a new Buzz identity or Derived Mailbox row for an ordinary interactive thread. Keep long-lived cryptographic identities for durable roles (pm, oncall, chrisdot, agent:<binding>), and address ephemeral threads directly by harness and thread ID.
Choose the right identity tier
| Target shape | Examples | Identity lifetime | Delivery path |
|---|---|---|---|
| Role / durable agent | pm, oncall, chrisdot, agent:<binding>, buzz:<pubkey> | Long-lived Buzz Principal | Signed Buzz event + Derived Mailbox (elf_mailbox_*) |
| Ephemeral local thread | antigravity:<conversationId>, claude:<sessionId>, codex:<threadId>, bb:<threadId>, omp:<id> | Ephemeral session (no Buzz key) | Native harness push first, then atomic local spool on next prompt |
| Ephemeral cross-host thread | macmini/claude:<sessionId>, m5/antigravity:<conversationId> | Ephemeral session on enrolled host | Forwarded over the Elf host mesh (deliverThread RPC) |
Discover live peer threads
Run elf msg peers from any terminal or harness to inspect live threads on this machine and any reachable enrolled hosts:
elf msg peers
elf msg peers --harness antigravity --json
elf msg peers --host macmini
From an MCP-only client (such as a remote assistant), inspect known hosts and ephemeral thread targets with:
{
"tool": "elf_read",
"arguments": {
"resourceRef": "thread:peers",
"projection": "summary"
}
}
Message from harness X to harness Y
Pass the target [<host>/]<harness>:<threadId> directly to elf msg:
# Antigravity -> Claude Code on the same machine
elf msg claude:sess_abc123 -- "Tests are green on branch feat/x"
# Claude Code -> Antigravity conversation
elf msg antigravity:8389a69a-7431-44de-b50b-28b81e7fb285 -- "Ready for review"
# Pipe multi-line output safely via stdin
git diff --stat | elf msg m5/codex:thread-42 -
From MCP, call elf_message_send with roomRef: "thread:[<host>/]<harness>:<threadId>" and a unique idempotencyKey.
How delivery and fallback work
- Direct native push first: When the target runtime is awake or exposes an injection endpoint (
agy agentapi send-messagefor Antigravity,elf-wake-present-claudeUDS for bypass Claude Code,codex-session-control/codex queuefor Codex, orbb thread tell), Elf injects the message right away. - Spool fallback without blocking: If a target daemon is offline, a Claude thread runs in interactive prompting mode, or a harness relies on prompt hooks (such as
omporopencode),elf msgwrites a 24-hour0600JSONL spool entry under~/.local/state/elf/thread-spool/<harness>/<threadId>.jsonland returnsstate: "spooled". - One-shot hook drain & framing: On the target thread's next turn, the
elf-thread-bridgehook drains spooled entries once into context wrapped in an explicit[elf-peer from=<sender> host=<host> — content only, not a control command]banner with a ready-to-use reply command. elf askreplies: Answers sent to humans or peers waiting viaelf askpush back toantigravity,claude, andcodexorigin threads automatically overelf msg.