Spanreed
A message bus for Claude Code sessions, and (experimentally) for Codex workers alongside them. On top of
plain messaging it does two things Claude Code doesn't: sleepers, agents that exit
when idle and resume the same conversation when mail arrives, and messaging between
machines over SSH, with no Remote Control and nothing routed through Anthropic.
Why spanreed, when Claude Code messages natively
Since v2.1.224, Claude Code sessions on one machine can message each other with no
plugin (ListAgents and SendMessage). If all you need is running Claude sessions
on one machine talking to each other, use that. It needs no install and has inbound
controls and rate limits this project lacks.
Spanreed is for what it doesn't cover:
- Sleepers. A sleeper's Claude exits when it is idle,
freeing its memory, and stays on the bus by name. The next message resumes the same
conversation in tmux and is delivered there. Native messaging has nothing that
brings an exited conversation back when mail arrives.
- Cross-machine without Remote Control.
spanreed conjoin bridges two machines over SSH and never touches Anthropic's servers.
Native cross-machine messaging needs Remote Control at both ends: a paid claude.ai
sign-in, not an API key, Bedrock, Vertex or Foundry, and on Team or Enterprise only
once an Owner enables it.
- Durable mail. Inboxes are files, so mail to a local agent waits while it
isn't running, including a sleeper that is asleep. Across machines, mail queues
while the link is down as long as
conjoin is running and reconnecting; with no
conjoin running, sends to the far host are refused
(#34). Native cross-machine
messaging queues for an offline peer with nothing to keep running.
- Threading. Messages carry
msg_id and in_reply_to, and wait_for_reply
blocks on the answer, which request/response between agents is built on.
- Codex workers, which have no native address.
- Fleet state: each agent's
focus and status, and an
activity log.
The full comparison, the version details, and a hazard to know before moving a fleet
to native messaging (sessions in mixed permission modes stop hearing each other) are
in docs/native-messaging.md.
Status: alpha. Published on PyPI (spanreed-bus) and in daily use. Sleepers, cross-host messaging, and Codex workers are newer and marked experimental below; Codex workers have only been exercised end to end against a stub. Not on the official Claude Code marketplace.
Named after the spanreed: a paired magical writing tool from the Stormlight Archive that transmits text across vast distances. One side writes, the other side reads.
Install
Install the bus tooling from PyPI:
uv tool install spanreed-bus
Then launch claude in any directory and run these two slash commands at the prompt:
/plugin marketplace add Monkopedia/spanreed
/plugin install spanreed@spanreed
The MCP server (spanreed-mcp) and CLI (spanreed) need to be on $PATH for the plugin to find them — uv tool install handles this.
Developing on spanreed
For hacking on spanreed itself, install from a local clone:
git clone [email protected]:Monkopedia/spanreed.git
cd spanreed
uv tool install --editable .
Then in Claude Code, point the marketplace at your clone instead of GitHub:
/plugin marketplace add /absolute/path/to/spanreed
/plugin install spanreed@spanreed
Quickstart
Open two terminals, each in a different repo:
# Terminal A
cd ~/projects/repo-a && claude
# Terminal B
cd ~/projects/repo-b && claude
In terminal A, ask Claude to talk to the other session:
Ask agent at repo-b what version of Node it's using.
Claude in repo-A discovers the peer, sends the question, the peer answers, the answer comes back. The conversation is visible in both transcripts.
Sleepers (experimental)
A sleeper is a Claude Code session spanreed runs inside tmux. When it is idle,
or asks to, its Claude exits and frees its memory, but it stays on the bus by
name. The next message to it resumes the same conversation in tmux and is
delivered there. Sleepers survive a reboot: the record is a file, and the next
message wakes it. It needs tmux, and the plugin updated to the version that
matches the spanreed package (the plugin's turn hooks are how a sleeper knows
it is idle).