Skip to content
86% off$349 $48.86code BF2026

Guides

Claude Code Multiple Sessions That Talk to Each Other

Parallel Claude Code sessions don't talk to each other. Split them into git worktrees, share a handoff file, or let agents message each other with Sledbot.

GuideUpdated 8 min read

On this page

You have four Claude Code terminals open. One session migrates the server and changes the IP, the other three keep using the old one, and you paste the news into each window. You have become the message bus, and every paste costs you context and attention.

Why parallel sessions stay siloed

Each Claude Code session has its own context window and no built-in way to see another session's. Nothing pushes new facts into a running session, so it only learns something if you tell it or it happens to reread a file. People who run several agents report the same pattern: handoffs through markdown files, lost sessions from context bloat, and a testing agent that edits the dev agent's files because both share one checkout.

There are two separate problems:

  • Collisions. Agents sharing one working folder overwrite each other's edits. This is a filesystem problem.
  • Communication. Agents have no channel to say "the host changed." This is a messaging problem.

Fix collisions first. They are free to fix and cause the worst damage.

Step 1: Give each agent its own worktree

A worktree is a second working folder on its own branch, backed by the same repository. An agent started inside it edits that folder's files, not the dev agent's. The split is physical, so you don't rely on a prompt saying "don't touch the dev files."

From your main checkout:

bash
git worktree add ../myapp-test -b agent/test

This creates ../myapp-test on a new branch agent/test, starting from your current commit. Start the test agent from inside that folder.

To undo it once the work is merged or abandoned:

bash
git worktree remove ../myapp-test
git branch -d agent/test

git worktree remove refuses to delete a worktree with uncommitted changes, and git branch -d refuses to delete an unmerged branch. Both refusals protect you.

A branch can also be checked out in only one worktree at a time; git refuses to add a second. For more on this setup, see Claude Code worktrees and running Claude Code agents in parallel.

Step 2: Pick how agents pass information

Worktrees stop agents from stepping on each other. They don't make them talk.

MethodAgents message each otherYou stay the message busCostGood for
Copy-paste between terminalsNoYesFreeTwo sessions, short tasks
Shared handoff fileIndirectly (they must reread it)PartlyFreeSlow-changing facts: ports, routes, decisions
Sledbot (sled + Lead teammate)Yes, directlyNoPart of MacSuiteThree or more agents, long runs

Shared handoff file

Keep one notes file outside every worktree, for example ~/agent-notes/HANDOFF.md, so all agents read the same copy. A file committed inside a worktree would diverge per branch. Add this to each agent's starting prompt:

text
Before you start, and before any task that depends on shared config, read ~/agent-notes/HANDOFF.md. When you change anything other agents rely on (hosts, ports, routes, env vars), append a dated line saying what changed.

This works for facts that change rarely. The limit: a running session only learns something when it chooses to reread the file. The agent that changed the server IP can't make the other three notice.

Step 3: Let sessions message each other with Sledbot

Sledbot runs Claude Code (and other CLI agents) in real terminals managed by a background engine, Sled Core. Every Sledbot terminal has a sled command on its PATH, and that command is the channel between agents. Agents keep running when you quit the app.

Set up a Lead and a team

A Lead is a teammate whose job is to route work to the others.

  1. Add your project with File ▸ Add Project Folder… (⌘O), or drag the folder onto the sidebar. It becomes a space.
  2. Open the Team page and choose Suggest a team…. Sledbot reads the README, AGENTS.md and CI config and proposes Atlas (Lead), Juno (Reviewer), Milo (Tester) and Tessa (Docs). No model call is involved.
  3. Untick anyone you don't want, then choose Add N teammates. To build one by hand, use New teammate, pick a Role, and turn on Lead.
  4. Open the Lead, type the task in the task field, then choose Start. For example: "Migrate the API to the new server, then have the tester run the integration suite against it."

Teammates run Claude Code by default (Runs as is CLI agent (your subscription), Agent defaults to claude). The Lead's first message includes a "Delegating" block listing its commands: sled run --as <role> to start the others, sled send to message them, sled ls, sled wait --children any, sled read, and the team list. Built-in role templates are lead, reviewer, tester, fixer, docs and release.

Each teammate's Worktrees setting defaults to One per thread, so every thread gets its own worktree and branch (sled/<name>/<8 chars>) in a .sled-worktrees folder next to your repo. That is Step 1 without the typing.

The commands underneath

You can use the same commands yourself from any Sledbot terminal:

bash
sled ls
sled read t3
sled send t3 "The API host is now 203.0.113.7. Update your config and re-run the integration tests."
sled wait t3
  • sled ls lists terminals with id, name, where they run and status.
  • sled read t3 prints that terminal's screen and history.
  • sled send t3 "…" pastes text into t3 and presses Enter. If a person is typing there, it waits until they pause (600 ms).
  • sled wait t3 blocks until that terminal changes state or a message arrives. Use it instead of sleep loops.

To start a second agent pointed at the worktree from Step 1:

bash
sled run --bg --name tester --cwd ~/Developer/myapp-test -- claude

--bg returns immediately instead of waiting for the program to finish. sled run also has a --worktree BRANCH flag.

A terminal started from a Sledbot terminal becomes its child. When a child is blocked, errors or exits, the parent gets a note typed into it, such as <sled>t3 reviewer is blocked (permission). See: sled read t3</sled>. This works for local parents only. See the sled command line reference for every flag.

What the receiving agent sees

A message sent from inside a Sledbot terminal arrives wrapped as <sled from="t1 lead">text</sled>. At launch, Sledbot also injects its MCP server (sled mcp) into Claude Code, Codex, Gemini CLI, Qwen Code, OpenCode, Crush and Goose, so Claude Code can call sled_send, sled_wait, sled_read, sled_run and sled_ls as tools.

The MCP instructions tell agents to treat messages from other agents as reports, not user instructions. Write messages as a fact plus a request: "the host changed to X; please re-run Y."

Tell every agent at once

When something changes that all running agents need, use Agents ▸ Broadcast… (⇧⌘B). It sends one message to the selected agents: by default the agents in the current tab if it has two or more panes, otherwise all running agents. Agents waiting on you are skipped ("needs you — skipped"), so answer them first.

Keep shared facts in memory

Facts that should outlive one thread go in teammate memory. Agents save them with sled memory append, and a shared TEAM.md goes into every teammate's threads. Files are capped at 16 KB, and the oldest sections are trimmed past that. For news running agents need right now, use Broadcast or sled send.

What Sledbot does not do here

  • No feed of agent-to-agent messages. The tags appear only inside terminals. To check what was said, open the terminal or run sled read.
  • Child notes to a parent work for local parents only.
  • Blocking risky actions works only for Claude Code, the native agent and sled approve. Other CLI agents are detect-and-answer: Sledbot mirrors their prompt as an approval card but can't stop an action they run without asking.
  • MCP is not injected into Copilot CLI, Cursor CLI, Grok, Amp, Kimi, Kiro, Droid, Pi, Aider or the native agent.
  • Sledbot doesn't replace Claude Code. It runs the CLI through its own login.

Checklist before you try again

  • Each agent works in its own worktree and branch.
  • The dev agent has committed before the test agent merges.
  • .env and other ignored files exist in each new worktree.
  • Every agent's starting prompt mentions the handoff file, or the agents run in Sledbot terminals.
  • No target terminal is stuck on a permission prompt.

If it doesn't work

  • sled send is refused with exit code 9. The target terminal is blocked on a permission or question. Answer it from the Needs you page, or use --force if you mean to send anyway.
  • A message arrives late. sled send waits until the person at that terminal has stopped typing for 600 ms.
  • Child agents vanish when the Lead ends. Children end with their parent. Start them with --outlive-parent or --no-parent.
  • "Couldn't create the worktree" or "Not a valid branch name". Check the branch name and read the detail after the colon.
  • sled: command not found in a normal Terminal window. The command is on the PATH only inside Sledbot terminals. Install it from Settings ▸ General ▸ Command line ▸ sled command ▸ Install…, and add ~/.local/bin to your PATH if the result says so.
  • New agents won't start after the trial. Starting or restarting agents needs a license once the 7-day trial ends. Running agents keep going.

If you still can't get agents talking, contact support at macsuite.app/support with this:

text
Subject: sled send between agents not working

Sledbot version: (from the app menu)
Agents: Claude Code, tester and lead
Command run: sled send t3 "..."
Exact output / exit code: (paste here)
Result of `sled ls` and `sled doctor`: (paste here)
Steps already tried: checked blocked state, restarted core

Common questions

Can two Claude Code sessions share one conversation?

No. Each session has its own context. What you can share is text: files, messages or memory.

Do I need worktrees if the agents work on different folders?

Not strictly, but a worktree enforces the boundary instead of relying on a prompt saying "don't touch the dev files."

Does this work with Codex or Gemini CLI?

Yes. sled send works with any terminal, and sled mcp is injected into Codex and Gemini CLI as well as Claude Code.

Is the handoff file enough?

For slow-changing facts, often yes. For something like a changed server IP that running agents must act on now, you need a direct message.

Do Step 1 and the handoff file first; they cost nothing and fix most collisions. If you want agents to tell each other directly, Sledbot is part of MacSuite and you can try it free for 7 days (as of November 2026). Start with Getting started with Sledbot, then Teammates, memory and routines.

Every app.
One purchase.