You have two AI coding sessions open. One is building the API, the other is building the UI. The UI session needs to know the shape of the new endpoint, so you ask the API session, copy its answer, switch terminals and paste it in. Ten minutes later you do it again in the other direction.
You have become the message bus between your own agents. It is slow, you lose detail every time you summarise, and it stops the moment you step away.
Let the sessions talk to each other. A session that already holds the answer can give it directly to the session that needs it, and you stay in control of what each one is allowed to do.
Claude Code has three kinds of messaging. They solve different problems.
| Kind | What it does | Enabled |
|---|---|---|
| Cross-session messaging | One running session sends a message to another running session - on the same machine, on another machine, or in the cloud | On by default |
| Continuing a subagent | The main session sends a follow-up to a subagent it spawned earlier. The subagent resumes with everything it already read | On by default |
| Agent teams | A lead session and several teammates share a task list and message each other by name | Experimental, off by default |
For cross-session messaging, give each session a name with /rename or --name, then ask in plain language:
Ask the api session what the response of the new GET /invoices endpoint looks like
Run /list-agents to see which sessions, subagents and teammates you can reach.
Sessions on the same machine talk over a local socket, and the messages never leave your computer. Reaching a session on another machine or in the cloud goes through the vendor's servers and needs Remote Control connected.
Neither has messaging between independent sessions today. Both let a parent talk to the agents it spawned.
| Tool | Session to session | Follow-up to a spawned subagent | Agents talk to each other |
|---|---|---|---|
| Claude Code | ✅ Local, other machines and cloud | ✅ | ✅ Agent teams (experimental) |
| OpenAI Codex | ❌ | ✅ The parent steers a running subagent | ❌ |
| GitHub Copilot | ❌ You can steer a running cloud session yourself | ⚠️ In Copilot CLI. Subagents in VS Code are stateless | ❌ Handoffs between custom agents only |
This area changes quickly, so check the product documentation under Learn more before you rely on the table.
If your tool has no messaging, or your sessions run in different tools, use something every agent can read:
HANDOFF.md or updates the plan file, the other reads itapi session to describe the new endpointui sessionui session asks whether the date is UTC. Bob switches back and asks the api session❌ Figure: Bad example - The developer carries every question and answer between sessions by hand, and details get lost
ui session: "Ask the api session for the contract of the new invoices endpoint, then build the list page"ui session asks the api session, including its follow-up question about datesapi session answers from the code it just wrote✅ Figure: Good example - The session that needs the answer asks the session that has it
A message from another session is not a message from you. Claude Code tells the receiving session where the message came from, and the receiver cannot use it to approve a permission prompt, change configuration or run slash commands.
Keep that boundary yourself as well: