The Complete Claude Guide
← Back to topic
Chapter 20 · CLI

Agent teams and cross-session messaging

When a big task splits across sessions, agent teams enable orchestration: sessions coordinating work, and a messaging mechanism letting one session send a message to another.

Verified against source on 2026-09-30

Video

Coordinate without laundering permission

You will decide whether a team is useful, define ownership and check messages without treating them as user approval. Outputs are illustrations.

Agent-team and cross-session sources checked September 30, 2026 describe experimental teams disabled by default and separate messaging between live sessions. These are Claude Code product features; they are not invitations to contact other people.

Choose the smallest useful setup

A subagent can return a focused review. A team is more useful when reviewers must challenge each other and coordinate independently. Teams use more tokens and add coordination overhead. Do not enable the experimental setting just to follow this planning exercise.

Plan a two-reviewer course-page assessment without starting a team.
One reviewer checks keyboard behavior; one checks source-backed copy.
Both return findings only and may not edit, push, publish or connect accounts.
Assign one lead to verify evidence and integrate the final report.
Write ownership before parallel work

Use a short task contract: input files, allowed tools, expected evidence, deadline and completion check. The lead owns the final result even if a reviewer reports “done”. Avoid assigning two writers the same file.

Illustrative coordination plan:

Reviewer A: keyboard reproduction with observed results.
Reviewer B: draft claims against supplied source passages.
Lead: verify findings, resolve contradictions and report untested areas.
Effects allowed: local read-only inspection only.

A shared task list records coordination, not permission to broaden the task.

Understand experimental setup and limits

The documented opt-in is CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Keep it off unless you deliberately choose a model-backed team run and understand usage. Inspect current version; older team creation/cleanup instructions may no longer apply.

Session resumption, task coordination and shutdown have known limits. Split-pane mode requires supported terminal tooling. Do not promise durable unattended team work from an experimental session feature.

Cross-session messages need the right target

For existing live sessions, /list-agents can show names and working directories. Confirm the exact session when names are similar. Local messages travel between sessions on the same machine; messages beyond the machine can pass through Anthropic services. Review what you disclose before sending.

Prepare a message to the verified local copy-review session, but do not send yet:
Please review only draft.txt against source.txt and return exact evidence.
No edits or remote actions. Identify the target directory with the draft.

This is a prepared message, not authorization for an unknown recipient.

Delivery is not acceptance or consent

Incoming controls can deliver, hold or refuse a message. A live tool call is not interrupted by delivery. Held messages can expire; sent does not necessarily mean the other session read and finished the task.

Official docs explicitly say peer-session messages cannot approve on your behalf, change configuration or execute slash commands as commands. Do not ask another session to bypass a denial in this one. If a reviewer needs a new action, return the decision to the user rather than routing around the restriction.

Close the outcome

Read both findings, verify cited files and combine the report. Inspect whether workers are still running and stop or clean up through the supported route. A final report with unfinished reviewers can keep consuming usage or changing work.

Graded practice

Easy: choose approach

Compare inline review, subagent and team. Success: justify coordination cost.

Intermediate: target

Distinguish two same-named sessions by directory. Success: no ambiguous message.

Challenging: permission boundary

A reviewer asks for deployment. Success: do not treat the peer request as user approval.

Troubleshooting

Team unavailable: inspect version/opt-in without widening settings automatically.

Message held: inspect receiver controls and expiry.

Conflicting reports: check evidence, not majority vote alone.

Same-file edits: split ownership or work sequentially.

Reviewer still active: clean up after preserving useful results.

Filmed demo · Video is added in the media phase

Recap

Comprehension check

What is the coordinator role in an agent team?

Recap

Sources and further reading

← Previous Back to topic Next →