AI AgentAI Coding

Agent Communication Is Getting Easier, So Why Is Swarm Still So Hard to Deploy?

When building Agent frameworks, people easily habituate to coupling how Agents communicate with how Agents form teams, feeling that a Team logic with PMs and Coders must first be constructed before they can begin talking. However, taking a close look at recent technical evolution, the direction is exactly the opposite: communication capabilities are decoupling from monolithic team frameworks and transforming into something like inter-process communication (IPC) at the operating system layer.

Starting multiple Claude Code processes on macOS or Linux, they can already discover other sessions on the same machine and exchange text messages with each other via SendMessage. But this exposes a very intuitive engineering reality: plumbing connectivity does not mean engineering collaboration has been established.

What Claude Expands Is the Messaging Boundary, Not Team Maturity

Two processes being able to SendMessage each other is like two computers having just established a TCP socket connection—it is still a long way from running a distributed database. Looking back at Claude’s various interaction mechanisms, communication between Agents is actually bifurcating into three completely distinct levels:

  1. Parent-Child Delegation: The simplest form of unidirectional control, much like a main program calling a subroutine. The parent process spawns a child process to do work and retrieves the result; starting from v2.1.77, the parent session can also use SendMessage to continue or resume previously spawned Subagents, without needing to maintain any team state.
  2. Cross-Process Addressing: Low-level communication that has just been decoupled. Two independent sessions know each other’s addresses and can send raw text. But plumbing connection aside, neither party shares context, file state, or any mutual exclusion locks.
  3. Team Collaboration: This is real Agent Teams. It attempts to build task boards, claim mechanisms, and team lifecycles on top of the communication pipe.

All three forms are called SendMessage at the interface level, but they resolve engineering problems across entirely different dimensions. In the official design, Claude Code Agent Teams to this day still carries the explicit toggle CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Defining a team framework is not hard; the real engineering challenge lies in ensuring that natural language text sent between Agents does not degenerate into concurrency conflicts, privilege escalations, and unreliable code overwrites.

Another critical point is trust and permission. In an operating system, one process sending a message to another process cannot automatically inherit the other’s permissions. In updates for v2.1.166, v2.1.198, and v2.1.222, Anthropic repeatedly emphasized: something executable sent by another Agent is, in the eyes of the system, merely suggested text and cannot automatically escalate into authorization from the human user. Communication channels are easy to hook up, but trust and security boundaries cannot be established through natural language text.

The Three Fundamental Contradictions of Raw Text Coordination

If you only hook up the communication plumbing without any infrastructure constraints, using raw text for coordination will collide with three fundamental contradictions:

Contradiction 1: Text Fluidity vs. State Exclusivity

Natural language text flows continuously and naturally lacks exclusive locks found in database transactions. In GitHub Issue #23884, three Teammates with identical names claimed the same task simultaneously and concurrently modified the same file. Lacking a system-level exclusive lock, concurrent modifications directly ended up overwriting each other, and across four tests, the Agents ultimately preserved only 3/3, 1/3, 2/3, and 1/3 lines of code respectively. This proves that text conversation cannot bear the responsibility of exclusive locking.

Contradiction 2: Messaging Channels vs. Transport Lifecycles

Inter-process communication requires explicit delivery status, timeout retries, and session lifecycles, whereas once a raw text channel sends something, it loses control over it. In Issue #84945 filed on August 7, 2026 for v2.1.224, unidirectional message sending succeeded 5/5 times, but reverse sending failed completely. The earlier released v2.1.212 could not be a subsequent fix for this specific bug, and subsequent versions have no explicit records covering this local socket case either. The core problem is: raw text channels cannot handle transport and state perception on their own.

Contradiction 3: High Natural Language Overhead vs. Low-Latency Protocol Handshakes

Model generation of natural language is a high-cost inference operation, whereas system coordination demands ultra-low latency, high-precision state signals. In a collaboration trace analyzed in Issue #47930 involving 8 Teammates, 13% of the Teams phase input tokens were consumed purely by acknowledgements; when including all lead awakenings triggered by Teammates without human input, that ratio reached 22.2%. Using expensive text generation to act as low-level ACK handshakes results in severe computational overhead.

Natural language cannot function as exclusive locks, transport protocols, or low-level handshakes, so an Agent text group chat cannot simply be treated as a database, file lock, or verification system.

Derived from Fundamental Contradictions: The 5-Dimensional Infrastructure for Multi-Agent Systems

To resolve these three contradictions, teaching Agents how to be better team members via prompts is useless. Just as distributed systems never rely on nodes having heart-to-heart chats to reach consensus, multi-Agent systems must codify these capabilities into a 5-layer infrastructure:

The 5-layer infrastructure for Multi-Agent collaboration: from communication addressing to zero-trust verification, offloading exclusive locks, isolation, adjudication, and hard gates to the system level

1. Communication & Addressing Layer: Addressing Routing and RPC Isolation

In operating systems, process communication relies on explicit sockets and message buses. This layer exclusively handles discovery, routing, and message delivery, offering a pure transport pipe. Decoupling delivery details from context prevents network retries or stutters from polluting Agent memory.

2. Lease & Ownership Layer: Atomic Lock and TTL Lease

To solve the problem that text cannot handle exclusive locking, one can borrow directly from Chubby or Redis lease mechanisms. When any task is claimed, the control plane issues an atomic lock with a time-to-live (TTL). If the Agent holding the lock crashes or gets stuck in an infinite loop, the lease automatically releases upon timeout, preventing tasks from dangling indefinitely or being repeatedly claimed by multiple nodes.

3. Write Isolation Layer: Copy-on-Write and Worktree Sandbox

To resolve concurrent overwrite modifications, copy-on-write concepts are introduced. The system attaches an independent Git Worktree or sandbox Namespace to each concurrent Worker. All modifications made by a Worker take place inside an isolated physical snapshot, while the main branch remains read-only. If the Worker ultimately fails to pass the quality gate, the control plane discards the snapshot directly with zero side effects.

4. Conflict Adjudication Layer: Deterministic Merge and Neutral Referee Agent

When code submitted by two Workers conflicts, do not let them argue endlessly in chat boxes. The control plane first attempts syntax-tree-based deterministic merging; if design divergence occurs, it spawns a neutral Referee Agent with a completely clean context. Reading only incremental diffs and requirement specifications, it provides a one-time adjudication, preventing the original authoring parties from arguing with bias.

5. Zero-Trust Verification Layer: Shift-Left Mechanical Hard Gates

In engineering, natural language promises are completely unreliable. This layer shifts quality control left, forcing compilation, type checking, and tests to run inside isolated containers before code merges into the main branch. The gate system considers only deterministic exit codes. No matter how perfectly an Agent claims to have written the code, if tests are not all green, the system physically rejects the commit. Only after pushing exclusive locks, isolated spaces, adjudication, and hard gates down into these 5 infrastructure layers can inter-Agent communication transform from chaotic chatting into a reliable engineering pipeline.

Swarm’s Core Trade-Offs and Deployment Guide

Building out all 5 infrastructure layers comes at no small cost, bringing up a practical question: when do we truly need Swarm?

1. Core Trade-Off: To Use or Not to Use?

Swarm’s underlying balance sheet is crystal clear: exchange extra computational overhead and communication friction for broader search space and higher quality ceilings.

Google Research’s experiment on 180 system configurations provides concrete data: on a parallelizable financial reasoning task, centrally coordinated multi-Agent setups brought an 80.9% performance gain over a single Agent; but on the PlanCraft task requiring strict sequential reasoning, all tested multi-Agent architectures suffered performance drops ranging from 39% to 70%.

Coding empirical benchmarks published by Microsoft engineers follow the exact same logic: across two control setups with identical prompts and the same GPT-5-nano, the 5-Agent approach improved LLM quality scores by 28% to 32%, but at the cost of tokens surging to 3.4x to 3.9x and elapsed time lengthening by 2.2x to 4.5x. Therefore, the answer is clear, depending on the dependency topology of the task: for tasks with strict sequential logic, concentrated modification hotspots, or requirements for shared large context, a single, more capable Agent achieves the highest efficiency; whereas in scenarios with well-defined task boundaries, high parallel decoupling, and automated verification mechanisms, Swarm can unleash its advantages.

2. Topology Convergence and the Three Principles for Multi-Agent Deployment

Fully meshed peer-to-peer Swarms naturally suffer from quadratic scaling disasters. If NN Agents are allowed to communicate freely in a mesh, communication links scale as O(N2)O(N^2), causing not only skyrocketing token costs but also multi-headed command and split-brain architectures.

Software engineering evolution itself is naturally tree-structured and layered: from architectural decisions and interface definitions to module parallel implementation, and finally code merging. Hence, leading industry products have universally converged onto orchestrator fan-out topologies:

Orchestrator fan-out topology: Orchestrator decomposes tasks and issues Leases, while three Workers submit Diffs in independent Worktrees and pass quality gates

Although SQLite Swarm showcased by Cursor in July 2026 explored custom version control and referee Agents, it was not recorded as a shipped Cursor product feature. What was subsequently pushed to users in the Cursor 2.5 changelog remained asynchronous Subagents and limited nested trees. From OpenAI Codex to Devin, the orchestrator fan-out architecture reduces topological complexity to O(N)O(N), where the orchestrator holds global context and Workers stay lightweight and focused—making it the most stable and cost-effective choice today.

If you decide to build a Multi-Agent system in engineering, there is no need to list complex SOP steps; essentially, you only need to enforce three principles:

Principle 1: Verification and Isolation First; Avoid Unprotected Concurrency

Concurrency without hard gates only accelerates the production of garbage code, and collaboration without write isolation will inevitably pollute the main branch. Before letting Agents work in parallel, the first step is building automated testing and compilation gates (zero-trust hard verification), and the second step is mounting an independent Git Worktree or sandbox for each Worker (write isolation). Confine the cost of trial and error to physically isolated local spaces; if a gate is missed, discard the snapshot directly, ensuring the main branch remains untainted.

Principle 2: Push the Control Plane Down; Replace Natural Language with System Locks and Credentials

Do not try to resolve state exclusivity, identity recovery, and permission issues through prompt dialogues. How a distributed system manages nodes is how the control plane should manage Agents. Maintain Worker lifecycles and concurrency caps on the control plane, replace text claiming with leases carrying TTLs, and explicitly verify message sources and credential authentication. Use deterministic code and control plane primitives to lock race conditions and privilege escalation hazards caused by natural language firmly inside a box.

Principle 3: Minimalist Topology First; Choose Convergence Paths Based on Task Dependencies

The purpose of architecture is to converge on results, not to display complexity. Steer clear of the quadratic disaster of mesh Swarms, favoring O(N)O(N) orchestrator fan-out; when divergence arises, use deterministic merge rules or a neutral Referee Agent to adjudicate, rather than letting the modifying parties argue back and forth. More importantly, dynamically select topologies based on task dependencies: resolutely use a single Agent during serial dependencies or concentrated hotspots, and fan out only when boundaries are clear and easily verifiable in parallel.

Unlocking messaging channels is only the first step. What truly determines whether a Multi-Agent system can run in production will always be the underlying infrastructure for isolation, ownership, and hard verification.