Skip to content
•JOURNAL

Can Claude Code sessions talk to each other? Three routes, and what the built-in one misses

Yes, two Claude Code sessions can talk to each other. On 2.1.224 or later the built-in cross-session messaging does it with no extra install. With mixed harnesses, tmux can carry a nudge between panes; a local messenger is the route that gives sessions names and gives you an inbox.

There are three routes in practice, and they differ in who starts the sessions, whether the receiver has to be idle, and whether a message can cross harnesses.

Route 1: the built-in cross-session messaging

It is on by default once your version supports it: 2.1.224 or later on macOS, Linux and WSL 2, 2.1.234 on native Windows, and 2.1.248 on Bedrock and the other cloud providers when feature-flag fetching is off. Type /list-agents (also available as /peers) to see which of your sessions a session can reach.

You don’t call the tools. Ask in prose, or type @ and pick a session from the typeahead on 2.1.232 or later, and Claude writes the message with SendMessage after finding the target with ListAgents. Each session binds a Unix domain socket on macOS and Linux, or a named pipe on native Windows, restricted to your OS user. A peer message is read between tool calls during an active turn, and starts a new turn when the session is idle, so a busy session is not interrupted mid-tool.

The boundary is the harness. It messages Claude Code sessions only; an OpenCode or omp session never appears in the list. The docs describe no channels or broadcast, and no inbox for you: to see what another session was told, you read that session’s pane or transcript. Sessions on other machines are reachable only through Remote Control, which needs a claude.ai subscription on Pro, Max, Ultra, Team or Enterprise; API keys don’t work.

The documented limits are worth knowing. Plain text only. About a million characters per message to a session on the same machine. Bursts refused at the sender, identical repeats dropped, at most 50 accepted messages queued, and message loops throttled. The receiving session’s permissions still apply, and crossSessionInbound can accept, hold or refuse peer messages.

Route 2: a local messenger

A local messenger gives independent sessions names and moves text between them. asenq is the one this site is about, so read this section with that in mind. It runs a per-user daemon on ~/.asenq/asenq.sock with mode 0600, stores messages in SQLite, and delivers through whatever path each harness exposes: a labelled user turn in Claude Code, a prompt through OpenCode’s plugin, a user message through omp’s extension.

That is the point. A Claude Code session named orch can message worker-oc in OpenCode and worker-omp in omp, even though only one of the three is Claude Code. There is no account, no sign-in and no relay; the socket and the SQLite file are the whole backend.

claude --name orch
ASENQ_NAME=worker-oc opencode
ASENQ_NAME=worker-omp omp
asenq setup
asenq doctor

asenq setup wires every harness it finds and backs up each JSON file as <file>.asenq-bak before touching it. asenq doctor checks the wiring and starts the daemon if it isn’t running. asenq setup --remove reverses all of it and keeps your message history.

Names are addresses. Send a direct message with asenq send worker-oc "run the API tests", or from inside an agent with asenq_send. An idle session starts a turn when the message arrives; a busy one sees it between tool calls. The message is labelled as agent-sent and says it cannot approve permissions, so no peer can supply consent on your behalf. You get asenq send, asenq inbox and asenq tui, plus channels for posts a group reads on demand.

What it does not do matters as much. It doesn’t spawn sessions, keep a task board, merge worktrees, relay through a cloud or run on Windows, and it isn’t a replacement for Claude Code’s agent teams. What it does do is give a designated orchestrator everything needed to lead: a role, a skill and messaging tools. asenq doesn’t orchestrate for you; orchestration lives in the skill and the workflow, not in a managed engine.

Route 3: tmux send-keys

If both sessions live in tmux, you can type into one from the other:

tmux send-keys -t work:1.1 -l -- 'the auth migration failed, check src/db'
tmux send-keys -t work:1.1 Enter

Keystrokes land in the pane as if you typed them. That covers the case where both panes are on screen and you need one nudge. It also explains the failures: no sender identity, no delivery state, and the text goes wherever the cursor is, including an open permission dialog.

Which route fits

If everything you run is Claude Code, use the built-in feature. It is already installed, it needs no configuration, and it comes from the people who make the harness. Learn /list-agents and stop copy-pasting.

If you mix harnesses, only a local messenger gives every session a name and gives you an inbox; tmux gets you a one-line nudge and no record of it. That is the gap asenq was written for, and the honest trade is another daemon in your setup.

Keep tmux for the one-off nudge while both panes are visible. It is not a protocol.

Questions that come up

Are subagents sessions?

No. A subagent runs inside one session, gets its own context window and reports to its caller. Its default route is back to that caller; a subagent whose tools include SendMessage can also message main or a named sibling, but nothing can address it as a registered session. asenq doesn’t register subagents either, so you can’t address one from asenq by name. Use them for delegation, not conversation.

Does any of this work on Windows?

The built-in messaging does, from Claude Code 2.1.234. asenq doesn’t support Windows.

Where does asenq keep its state?

A SQLite database at ~/.asenq/asenq.db, a Unix socket at ~/.asenq/asenq.sock with mode 0600, and message history that is kept for 7 days. Same user, same machine; the daemon listens only on the Unix socket, and the optional asenq city view binds a loopback port on 127.0.0.1.

Can I undo the setup?

asenq setup --remove reverts the hooks, plugin and extension wiring and keeps your history. Every JSON file setup edited was copied to <file>.asenq-bak first.

Is asenq an orchestrator?

Not as an engine that starts sessions and schedules tasks. It moves messages; it doesn’t spawn sessions, track a task board or merge work. It gives a designated orchestrator the surface to lead with: asenq role, installable orchestrator and worker skills, briefs with kind and thread, asenq_thread_read, and control messages. Orchestration lives in the skill and the workflow, not in a managed engine.

Related

  • Agent-to-agent communication in Claude Code: every option, honestly compared: /blog/claude-code-agent-to-agent-communication/
  • Subagents vs agent teams vs local messaging: /blog/claude-code-subagents-vs-agent-teams-vs-local-messaging/
  • How asenq delivers messages: /blog/how-asenq-delivers-messages/
  • Run multiple Claude Code agents in parallel: /blog/run-multiple-claude-code-agents-in-parallel/

Sources

  • Claude Code cross-session messaging (versions, ListAgents/SendMessage, sockets, inbound policy, limits): https://code.claude.com/docs/en/cross-session-messaging
  • Claude Code subagents: https://code.claude.com/docs/en/sub-agents
  • asenq install, setup and removal: https://github.com/parciffal/asenq
  • asenq delivery mechanics: https://github.com/parciffal/asenq/blob/main/docs/how-delivery-works.md
← Back to blog