I built a message bus so my Claude Code sessions can talk to each other in real time

Resource

The problem: I usually have a handful of Claude Code sessions open, one per project/tmux pane, and they can't see each other. So I end up hand-carrying facts between panes - "the other session set the port to 8081", "the model you loaded is aliased qwen-large". Annoying, and I do it several times a day.

Claudemux gives them a phone line. From any session:

/cm ask api which port is auth on?

https://imgur.com/a/PpgyF4J

The api session wakes on its own, reads the question, answers, and the reply lands back in your pane - asynchronously, so you just keep working. No copy-paste, no you-in-the-middle.

It's deliberately small - bash + jq + tmux + one systemd user service. No server, no ports, no database:

  • each session registers itself; messages are little JSON files in a mailbox
  • a per-machine relay watches the mailboxes and wakes the target pane with tmux send-keys
  • the ONLY thing ever typed into another pane is a fixed /cm recv — the message content is read from the file by that command, never injected as a turn, so a peer can't submit arbitrary text into your session
  • works cross-machine over SSH (/cm ask api@box ...), and incoming messages are framed as untrusted data

Repo: https://github.com/bjan/claudemux

Posted Jul 27, 2026, 7:10 AM UTC

03
Loading comments…