Claude Relay lets local Claude Code sessions message each other

Claude Relay is a Claude Code plugin that lets local sessions send natural-language messages to each other on the same machine. It uses an MCP server, a detached hub process, and a research-preview notifications channel that currently requires a dangerous load flag.

Claude Relay lets local Claude Code sessions message each other

Claude Relay is a new Claude Code plugin from innestic that lets multiple local Claude Code sessions talk to each other in natural language. According to the project’s HN post, one session can ask another, “ask the backend session if the auth token shape changed,” or broadcast status requests to every active session on the same machine.

The plugin is installed from within Claude Code with two commands: /plugin marketplace add innestic/claude-relay and /plugin install relay@claude-relay. That registers the MCP server and the relay slash commands for the current session.

⚡ New to this?

This news is about a tool that connects separate Claude Code sessions so they can message each other on the same computer. Claude Code is Anthropic’s terminal-based coding assistant, and MCP is the Model Context Protocol, a way for tools to expose functions to the model.

For non-experts, the main idea is that one AI session can now ask another AI session what it is doing, instead of treating each one as isolated. That matters for people using multiple coding agents across projects, especially when they want status checks, handoffs, or coordination without switching windows manually.

🦞 OpenClaw angle

If you run multiple local AI agents, treat this like an internal messaging layer and keep it scoped to one machine only. Use it for coordination tasks such as status reporting, peer lookup, or handoffs between project-specific agents, but do not depend on it for anything that needs persistence or audit history, because the hub stores state only in memory.

If you build on MCP, test for peer_gone, timeout, and hub_unreachable explicitly so your automation can fail cleanly when a session exits or the hub restarts. Also plan for the research-preview channel requirement: keep the --dangerously-load-development-channels flag isolated in dev workflows and avoid shipping automation that depends on it until the capability is generally available.

To send and receive messages, each Claude Code session that participates must be launched with claude --dangerously-load-development-channels plugin:relay@claude-relay. The author said the dangerously- prefix is required for now because the underlying channels capability is still in research preview, and the plugin has not yet been added to Anthropic’s trusted allowlist. The project says it will submit the plugin for review and remove the flag once approved.

The system is built around three parts: a session, a channel, and a hub. A session is one Claude Code process you start. A channel is the per-session MCP server provided by the plugin, which exposes the relay tools and listens for incoming messages. The hub is a detached daemon that runs once per machine and routes messages between channels over a Unix socket.

The project’s documentation says the first session to launch starts the hub, and later sessions connect to it. The hub survives session restarts and exits five minutes after the last peer disconnects. Incoming messages arrive as notifications/claude/channel, which means Claude can see them between turns.

The plugin exposes several tools that Claude routes to automatically. relay_peers lists active sessions on the machine. relay_ask sends a message to one peer and returns immediately, while the reply arrives as a notification. relay_reply answers an incoming request by ask_id. relay_broadcast sends a request to every other peer and streams replies back as notifications. relay_rename changes the current session name.

The post gives a few example prompts, including “what sessions are active?”, “ask backend-api what they’re working on,” and “ask everyone to report status.” It also notes that sessions can be renamed with /relay-rename backend-api, or by natural language such as “call yourself backend-api,” though the slash command is faster. Claude Code’s built-in /rename command also syncs automatically.

If two sessions share the same slugged directory name, such as ~/Code/backend/api, Relay adds suffixes like -2 and -3. The documentation says users can run relay_peers to disambiguate by current working directory.

The project also documents several error codes, including peer_not_found, peer_gone, timeout, name_taken, not_registered, already_registered, unknown_ask, bad_msg, hub_unreachable, bad_args, and protocol_mismatch. For troubleshooting, runtime data lives under $CLAUDE_PLUGIN_DATA, and the post points to logs under ~/.claude/plugins/data/relay-claude-relay/ and per-session MCP stderr under ~/Library/Caches/claude-cli-nodejs/<project-slug>/mcp-logs-*/.

Claude Relay is open source under MIT, requires Bun and Claude Code 2.1.80 or newer, and can also be run with a project-level .mcp.json for a live-reload development loop. The repository is on GitHub at innestic/claude-relay.

Source: HN Show HN ↗

More from OpenClaw News