peer-sessions

Spawn and coordinate fleets of Claude Code sessions that exchange messages via SendMessage.

20|8|Updated Aug 7, 2026
One-click install
npx skills add https://github.com/ray-amjad/peer-sessions --skill peer-sessions-ray-amjad
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: peer-sessions
Source: https://github.com/ray-amjad/peer-sessions
Command: npx skills add https://github.com/ray-amjad/peer-sessions --skill peer-sessions-ray-amjad

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Running multiple Claude Code sessions on one machine and getting them to exchange work is manual and error-prone: sessions need correct addressing, replies arrive asynchronously as user turns, and teardown is easy to get wrong. This Skill turns Claude Code's cross-session messaging primitive into a working loop — spawn a fleet, hand out briefs, collect replies, and tear down cleanly. ## Core Features & Use Cases - Fleet spawning with layout control: Launch N named sessions in cmux or herdr panes, workspaces, or windows via spawn-fleet.py, with verified readiness and printed teardown commands. - Address resolution and diagnostics: peer-addr.py lists live sessions, verifies messaging sockets, explains unreachable peers, and prints your own reply address. - Reply recovery and Codex bridging: peer-inbox.py recovers truncated peer replies from transcripts, and a documented relay path lets Codex contact a Claude session through a real temporary Claude relay. - Use Case: Spawn three research sessions in separate workspaces, send each a brief ending with your uds: reply address, end your turn, and receive their findings as new user turns — then hand the user the teardown block. ## Quick Start Ask Claude to spawn a fleet of named peer sessions in new workspaces, send each one a brief with your reply address, and collect their replies as they arrive.

Frequently Asked Questions about peer-sessions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run multiple Claude Code sessions that message each other?▼

Use spawn-fleet.py with NAME:DIR arguments to launch named sessions in cmux or herdr panes, workspaces, or windows. Send each peer a brief via SendMessage ending with your own uds: reply address, then end your turn — replies arrive as new user turns.

Why does SendMessage fail with "re-send with the ref"?▼

The first send to a bare session name always bounces with "not an agent in this conversation, re-send with the ref" — this is a confirmation, not a failure. Copy the [ref] from the error and send again, or use a uds: socket address which never bounces.

What version of Claude Code supports cross-session messaging?▼

Cross-session messaging requires Claude Code 2.1.224 or newer on macOS or Linux. Older builds publish no messaging socket, so the session stays alive but unreachable; running claude --resume <sessionId> on a new build repairs it while keeping history.

Can Codex send messages to a running Claude Code session?▼

Codex has no native SendMessage tool or messaging socket, so it must use a real temporary Claude Code session as a relay. The relay sends via its native SendMessage, and truncated replies are recovered from transcripts with peer-inbox.py.

Why is a peer session silent after a successful send?▼

success: true only means the message arrived, not that work finished. Common causes: the peer is still working, it is stalled on a permission prompt (check the pane for "Do you want to proceed?"), or the brief never included your reply address.

Does closing a cmux window stop the Claude sessions inside it?▼

No. Closing a cmux pane, workspace, or window leaves the claude processes running as addressable orphans. Always kill the process IDs first, then close the UI elements, and confirm with peer-addr.py.