Skip to main content

Spanreed

An inter-agent message bus for local Claude Code sessions. Run one Claude session per repo; let them coordinate.

Status: alpha. Published on PyPI (spanreed-bus) and in daily use for single-host, multi-session coordination. Cross-host messaging (spanreed conjoin) is experimental — see Cross-host. Not yet 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 git@github.com: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.

How it works

Two layers on Claude Code primitives:

  • MCP server (spanreed-mcp, per-session) exposes the bus API as typed tools: register, send, recv, list, wait_for_reply with timeout.
  • Plugin (auto-loaded) wires up a SessionStart hook for bus context, a Monitor for inbound wakeups, and points Claude at the MCP server.

State lives under ~/.claude/spanreed/ (registry + per-agent inboxes + per-session cursors). No central daemon — each session's MCP server is local and coordinates through shared files.

Read the full design in docs/architecture.md. Wire-format spec in docs/protocol.md.

Cross-host (experimental)

By default the bus is single-machine. To bridge two machines' buses, run on one host:

spanreed conjoin <other-host>

This opens a persistent SSH pipe to the peer and mirrors each side's agents into the other's list_agents (as agent-xxxx@host); messages addressed to a qualified id route across. It reconnects on its own if the pipe drops, and runs in the foreground until you stop it — supervision (start-on-boot, restart-on-crash) is left to you (wrap it in systemd/launchd/tmux).

Prerequisites: spanreed-bus ≥ 0.0.4 on both hosts, and key-based non-interactive SSH (it reconnects unattended, so it can't answer a password prompt). Full setup, the most common SSH gotcha (non-default key name), and how to update spanreed on a peer host: docs/cross-host.md. Design in docs/architecture.md.

Experimental and point-to-point only — no multi-hop routing or peer discovery yet.

Update

The Python package and the plugin update independently:

uv tool upgrade spanreed-bus

For the plugin, inside Claude Code:

/plugin update spanreed@spanreed

Development

See docs/development.md for environment setup, running tests, and contribution conventions. The CLAUDE.md at the root captures the discipline rules — Claude sessions working on this repo should read it.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spanreed_bus-0.0.9.tar.gz (110.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spanreed_bus-0.0.9-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file spanreed_bus-0.0.9.tar.gz.

File metadata

  • Download URL: spanreed_bus-0.0.9.tar.gz
  • Upload date:
  • Size: 110.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spanreed_bus-0.0.9.tar.gz
Algorithm Hash digest
SHA256 3003f1cb02d432132f6ba089d77c6e65cbfc72515d96007fe14eeaef8b6ec5d1
MD5 d20807e8b997f9536854b1613c07082e
BLAKE2b-256 5e4d4bec74546dc4a0c0c2a6e21999acdc87775c9a3910abfb4ecc559459ece0

See more details on using hashes here.

File details

Details for the file spanreed_bus-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: spanreed_bus-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spanreed_bus-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3373b38a3658f98939a947a4e1b453ecece420aa9fbeb74b7d9beb127f79b0cd
MD5 c8833a335f25a06cb16bfa2efb0a6003
BLAKE2b-256 3249737dbf05cdfa65ffec5f83be5870234dddde80d2c733565069060d149479

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.0.9 This release

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page