Skip to main content

crosschat

A method for agents to talk to each other.

crosschat gives Claude Code sessions a way to send each other messages over NATS — fire-and-forget, no blocking, no polling. Addressing is at the project level, not the session level, so you never need to know which ephemeral session is running: you send to a stable project id and whichever session is live there wakes up.

Why

Sub-agent fan-out is the usual answer when one session needs something another context already knows. It is expensive, and it re-derives context the other session already holds. crosschat lets two live sessions simply talk instead — each keeps its own working memory, and a question costs one message.

It also lets you run several specialised projects at once and address them individually — a team of experts rather than one generalist.

Install

pip install crosschat

Requires a reachable NATS server with JetStream enabled.

Use

One-time, shared infrastructure setup — run once ever, from anywhere:

crosschat init

Register a project and start listening:

crosschat register /path/to/my-project
crosschat monitor my-project

Send a message (this is also how you reply — pass the sender's id as the destination):

crosschat send my-project other-project "what did you learn about X?"

Discovery and cleanup:

crosschat list
crosschat remove my-project

All subcommands take an optional trailing NATS URL, defaulting to nats://localhost:4222.

How it works

  • Channelproject.{id}, one subject per project, backed by a JetStream stream (CROSSCHAT) so a message sent while a listener is reconnecting is not lost.
  • Discovery — a JetStream KV bucket (crosschat-registry) holds one entry per live project. Entries carry a 5-minute TTL and the monitor refreshes its own every 60 seconds, so a project that dies falls out of the registry on its own. No manual cleanup.
  • Delivery — the monitor subscribes with a durable consumer (crosschat-{id}), so the delivery position is tracked server-side. It never replays an already-acked message and never skips one, across restarts.
  • Wake contract — the monitor prints one CROSSCHAT_MESSAGE <json> line per message and keeps running. In Claude Code, watch it with the Monitor tool and each line becomes its own notification.

Project id

The project id is the slugified project directory name — C:\Projects\velhari becomes velhari. crosschat register is the only place this is derived; every other command takes the id as an argument or reads it from the registry.

Your folder naming is your addressing scheme. Unzip a brain into sb-architect/ and its address is sb-architect.

Status

Extracted from an internal fleet tool in August 2026 and renamed. The messaging core, discovery layer and CLI are covered by unit tests against NATS fakes plus a live smoke test. Trust between projects is deliberately out of scope for now: anyone who can reach the NATS server can publish to any project channel, which is fine for a single-machine, single-user setup and is the first thing to revisit if that changes.

License

MIT

Download files

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

Source Distribution

crosschat-0.1.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

crosschat-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file crosschat-0.1.0.tar.gz.

File metadata

  • Download URL: crosschat-0.1.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for crosschat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 524451092fe7622c7a09e84617fc2a99d2240b1c85a6a0fcd37846b7b188f1c4
MD5 b1843e655a15d0b3dc6afe235b9eecf8
BLAKE2b-256 cb2b32998a2212a71e0577375bfb1fa48b9480f2f22f7f82831d43ef771b8ba4

See more details on using hashes here.

File details

Details for the file crosschat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: crosschat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for crosschat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88e2888c2eba3f94f74e8ae11f5dedb6c95ad0c68365b3bf500ce3b2469c9212
MD5 db06e2810c3e0c1658aea0bbaf5ea27f
BLAKE2b-256 30456237301d74cecf2705919e738ea6ce9a82aa79fd46e64708f55f0d832a22

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.0 This release

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