Claude Code Sessions Can Now Talk to Each Other: The Era of Messaging in the Terminal

4 min read

Originally published in Turkish. Read the original →

Claude Code Sessions Can Now Talk to Each Other: The Era of Messaging in the Terminal - cover image
Summary

With version 2.1.224 of its popular terminal-based AI coding tool Claude Code, Anthropic has made a radical change to developer workflows. Thanks to the new ListAgents and SendMessage tools, different Claude Code sessions running on macOS and Linux can now exchange text messages with each other.

With version 2.1.224 of its terminal-based AI development environment Claude Code, Anthropic announced an important infrastructure change that will fundamentally alter how developers work. Independent Claude Code sessions open in different Terminal windows on macOS and Linux can now communicate directly with each other and share information.

This feature removes the need for developers working in parallel to manually copy output or an error from one terminal into another, and takes the coordination of autonomous AI agents on the local system to a higher level.

How Does Inter-Session Communication Work?

Two core tools sit at the center of the new messaging architecture:

* ListAgents: Automatically detects other Claude Code sessions running in the background or in active terminal windows on the user's computer and lists them with unique session IDs. * SendMessage: Sends a text message directly to a chosen target session.

When a message is sent, a visual tag card appears in the target terminal session showing the sender session's ID and the message content. This card makes it very easy for the developer or the autonomous agent to follow the reply.

bash
$ claude-code ListAgents
> Active Sessions:
  [1] session-backend-api (PID: 4021)
  [2] session-frontend-ui  (PID: 5108)

$ claude-code SendMessage --to session-frontend-ui --message "The API type update is done, you can regenerate the types."

Security and Data Isolation Principles

Anthropic kept data security and permission boundaries front and center when designing the system architecture. The inter-session messaging structure is limited by these strict security rules:

1. Plain Text Transfer Only: Past conversation transcripts, file contents or system permissions are never transferred between sessions. Only the intended text message is delivered. 2. No Self-Authorization: An incoming message cannot automatically approve a security permission in the target session or change the runtime environment settings. 3. Fully Local Process (Local IPC): Messages are not sent to Anthropic's servers; they are delivered directly through local processes on the same device (inter-process communication). This way, sensitive code data stays entirely on your device.

How Is It Different from Agent Teams and Sub-agents?

The Sub-agents and Agent Teams mechanisms we already knew in the Claude Code universe covered subtasks started by a single main process and managed hierarchically.

The newly added inter-session messaging, on the other hand, connects fully independent, equal (peer-to-peer) processes that the developer starts themselves in the terminal. This way, two separate Claude Code sessions working in parallel on different services in a microservice architecture can alert each other instantly to keep the project consistent.

FeatureSub-agents / Agent TeamsInter-Session Messaging
How It StartsCreated automatically by ClaudeOpened by the user in the terminal
HierarchyParent-Child relationshipPeer-to-Peer sessions
ScopeTask-based temporary processesLong-running independent work environments
Data SharingContext and file access can be sharedOnly limited text messages are transferred

Local On-Device Design and Remote Control Options

This messaging feature is currently limited to local sessions on the same machine. For developers who want to communicate between different physical machines or servers, Claude's Remote Control feature comes into play. With Remote Control, sessions in the Mac terminal can be connected to the Claude apps on mobile devices (iOS / Android).

With the release of version 2.1.224, Claude Code proves once again that terminal-based AI tools have moved beyond being single chatbots and become autonomous coworkers that can be orchestrated.