Back

The Swarm Needs a General

J

Jeremy McEntire

VP of Engineering10 min read

Three panels, each a finished part with a check mark: a sail, a pair of wings and a railway carriage. Lines from all three meet in one box, Assembly, two years later, marked with a cross
Three excellent parts, one vehicle that never assembles.

Three engineers are asked to build a vehicle.

One designs a sail. One builds wings. The third builds a luxurious Pullman railway carriage. Each does excellent work. Two years later they meet to put it together.

Nothing failed locally. Everything failed collectively.

Now make it a thousand engineers. One group reads the goal as plan A. Another reads it as plan B. Each convinces its neighbors. The neighbors make decisions, build parts, and bring in specialists whose work depends on those decisions.

By the time the two plans collide, choosing between A and B is the cheap part. The expensive part is two years of work built on both.

One goal splits into plan A and plan B. Each plan fans out into two, four, then eight pieces of work, and both bundles meet at assembly. A bracket under the work reads two years of work built on both
Choosing between A and B is cheap. The work built on both is not.

That is the problem I see in Konstantin Dunas’s “On the Nature of the Swarm.”1

Dunas starts in the right place. An agent’s context window fills up. Compaction throws information away. Files keep the facts but cost context to read back. So keep the specialists alive, let each hold what it has learned, and let them talk to each other directly.

That gives the system more memory. It also gives it a problem.

What makes a persistent specialist valuable is the context it has built up that nobody else has. That same context is what makes its judgment differ from everyone else’s.

Two people are driving to the same place. One wants to get there fast. The other likes the scenic route. They agree completely on the destination. At the first fork, one turns left and the other turns right.

Agents work the same way. Give them one goal and different context, and they weigh the tradeoffs differently.2 Each conclusion becomes somebody else’s starting assumption. Work piles up on both before anyone notices they can’t both stand.

The swarm’s advantage is the source of its trouble.

Three failures

Communication

A million agents have a million context windows. No one of them can read a million contexts.

An index helps. But someone has to build it, keep it current, and search it. The agent still has to know what matters, find it, fetch it, and fit it to the question. That cost grows with how many things the answer depends on and how far away they sit, even with good routing.

At some size, an agent spends its whole context finding what it needs and has none left to use it.

Coordination

Talking does not settle who decides.

I recently watched two engineering teams argue over where a record locator belonged. Each said it didn’t belong in their service. Each was right. A third engineer offered to build a new home for it.

That would have ended the argument. It would also have been wrong.

We were the system of record. Our existing locator was the one to use, every time. The other system answers to ours and never sends an ID of its own, so there was nothing new to find a home for. The right answer was not on the list the specialists were choosing from.

Left, the options on the list: team A's service, team B's service and a new service, each crossed out. Right, how the systems relate: our system of record holds the existing record locator and feeds the other system, which answers to ours and sends no ID of its own. In blue: use the existing locator, every time; it was not on the list
The right answer was not on the list.

Each team knew its own service cold. Neither had the view of how the systems relate.

Picking an arbiter doesn’t supply that view. If two agents favor A and B, they will nominate judges who favor A and B, and the argument moves to the nomination. Flip a coin and you learn who decides. You don’t learn whether they’re right.345

The decider worth having sees the whole dispute and answers for the outcome.

Cohesion

An unsettled decision gets more expensive every day that work continues on top of it.

The sail, the wings and the railway carriage did not become incompatible at assembly. They were incompatible the day their designers read the goal three ways. Assembly is just when everyone found out.

A big swarm can make remarkable local progress while moving further from anything that works.

Not every task runs into this. Independent work scales beautifully. Neighbors with a small disagreement sort it out themselves, and a lieutenant makes plenty of calls without asking a colonel. But directed work needs commitments that fit together, and something has to catch the ones that don’t before the cost compounds.

The root is not a mailbox

Dunas argues that the root of a hierarchy becomes a bottleneck, because everything its descendants know has to pass through it.

That describes a root that relays messages. A hierarchy built on abstraction works differently.

Herbert Simon and Stafford Beer laid this out decades ago.67 Complex systems work in levels, and each level deals with a different scope.

A general doesn’t need to know how each soldier cleans a rifle. A captain doesn’t pick the army’s objective. The PhD who knows everything about cement should not be setting the roof pitch.

Software works the same way. A component owns its facts and its behavior, and it keeps its contracts. The level above knows what the component can do, what it depends on, and what it promises. It does not know how.

The higher level does not hold more of the same context. It holds a different context.

That is also why architecture is not compaction. Compaction starts with the detail and guesses what it can throw away. Architecture starts with the intent, fixes the commitments that have to hold, and lets the detail grow underneath. Nothing is thrown away, because the detail doesn’t exist yet.

A decision belongs at the level whose scope contains its consequences.

Specialists should talk to each other directly and settle what is theirs to settle. When the consequences cross their boundaries, the decision goes to whoever answers for the larger whole.

Three levels of scope. The whole holds intent and the commitments that have to hold. Two components each hold what they can do, depend on and promise. Four specialists each hold how. Two specialists in one component settle a matter directly; a decision whose consequences cross from one component into the other goes up to the whole
Peers settle what is theirs. What crosses a boundary goes up.

The chain of responsibility does not have to be the wiring diagram.

What the experiments show

I tested these ideas with two numerical models.

The first simulated teams of agents with limited context. It varied how the work was divided, how messages were routed, how tightly the pieces were coupled, how much each agent could hold, and whether agents checked with the others they affected before changing something. When coupling was low to moderate, cutting the work along its real dependencies helped far more than changing the routing. When coupling was high, it was the other way around. Two of my seven predictions failed.

What moved the score, by coupling. line chart of Cutting the work along its dependencies, Routing over a mesh instead of a mailbox, Checking with the agents affected by How tightly the pieces are coupled, 7 data points.020406000.050.10.20.350.50.75How tightly the pieces are coupledGain in score (points)
What moved the score, by coupling
How tightly the pieces are coupledCutting the work along its dependenciesRouting over a mesh instead of a mailboxChecking with the agents affected
049.511.26.8
0.0549.9127.7
0.149.712.96.9
0.243.917.96.8
0.3533.121.17.5
0.521.122.38.5
0.75822.613.4
What moved the score, by coupling — First model, 200 seeds per cell at 20 tokens per decision. Each line is the average gain from one change, taken across the other two. Scores are on a scale where 100 is a full-information greedy hill climb, not a global optimum. At 0.5 the first two are within error of each other; the exact crossover is not established.
More context, or a better cut. bar chart of Gain in score by Change, 2 data points.0102030Double each agent's contextCut the work along its dependenciesChangeGain in score (points)9.229
More context, or a better cut
ChangeGain in score
Double each agent's context9.2
Cut the work along its dependencies29
More context, or a better cut — First model at coupling 0.1, for a swarm whose work was split at random: doubling each agent's context from 24 to 48 cached values, against splitting the work along its dependencies at 24 (prediction P6). Context here counts cached values, not text; 100 is a full-information greedy hill climb.
PredictionResult
P1At low to moderate coupling, cutting the work along its dependencies helps more than changing the routingHeld
P2A well-cut swarm beats one agent on the same budget at low coupling, and the edge shrinks as coupling risesFailedNo edge at low coupling; it appeared at moderate coupling
P3Routing matters far less when the work is cut wellHeld
P4Cutting the work too fine losesHeld
P5Agents that do not check with those they affect still trail agents that do, even on four times the budgetHeld
P6Cutting the work well helps more than doubling each agent's contextHeld
P7A swarm finds the structure itself and recovers at least 70% of the gap, net of the cost of finding itFailed68% at coupling 0.1
The seven predictions and their results, from the first model's published runs: 35,400 in all, 200 seeds per cell.

The model supplies the dependency structure and a common scoring objective. It tests what happens when the organization fits those dependencies and when it does not. It does not show that hierarchy is the only way to coordinate the work.

These are models, not live language-model agents. They show a mechanism and where it stops.8

Allowed is not provided

Dunas does not ask for a flat swarm forever. He says a pure mesh probably isn’t the final shape. He goes further: seed the swarm with the structure people already use, a shared repository, an issue tracker and a chat channel, and let the agents improve it.

That is a reasonable starting point. Finding structure in a mess may be the thing swarms do best.

But look at what the seed is. It is structure somebody assigned. A human sets the goal. A human supplies the tools, the protocols, and the starting organization. A human judges the result. That is a good deal of coordination, and none of it should be credited to the swarm.

And the structure has work to do while it is being changed. Someone must recognize which commitments still hold, which dependencies have moved, and who can decide when the old boundaries no longer fit.

Letting the swarm reorganize does not answer those questions. It makes answering them part of the swarm’s job. Those are the very problems the structure was supposed to solve.

Allowing a hierarchy to emerge is not the same as supplying one.

A written rule doesn’t change this. A rule is a decision somebody made earlier. Someone still has to recognize that this is the case it covers. When it doesn’t cover the case, somebody has to decide again.

And when the agents do set up a level that keeps the broader view, hands off the detail, and owns the decisions that cross boundaries, they have built a hierarchy of abstraction.

They have not done away with one.

The claim

Persistent specialists are valuable. Direct communication is valuable. Discovery in an unstructured pile may well need a swarm.

But a swarm by itself is not a general-purpose architecture for complex, directed work. A car that only turns left is fine on a racetrack. Nobody would sell it as a car you can drive anywhere.

A shared goal does not settle conflicting commitments. Something has to.

Emergent behavior needs no director. A goal does. You can drop the director only if you give up the goal.

To be general, a swarm has to do three things it has no mechanism of its own for. It has to find and combine information across bounded contexts. It has to settle decisions that exceed any one agent’s authority. It has to catch conflicting commitments before the cost compounds.

Layered abstraction gives all three jobs a home. Each level holds the context its scope requires, hands down what it doesn’t need to decide, and owns what crosses the boundaries beneath it.

It is not free. Cut the work too fine and the pieces stop fitting together, and a bad abstraction hides the one dependency that mattered.

None of this means more managers, or every message going through the top. It means someone answers for each decision at the level where its consequences land.

If a peer swarm keeps its decisions coherent as the dependencies shift, and does it without building a hierarchy of responsibility, I’m wrong.

A swarm that finds this arrangement and keeps it running has done something important. We should study how often it manages to, what it costs, and when the arrangement has to change.

But that would not show hierarchy was unnecessary. It would show the swarm learned to build one.

Notes

A very small difference in how agents read the same evidence can leave them in lasting disagreement.2

Robert Aumann’s “Agreeing to Disagree” (1976) shows that Bayesian agents with a common prior cannot hold different posterior probabilities once those posteriors are common knowledge.3 Scott Aaronson’s “The Complexity of Agreement” (2004) gives protocols for approximate agreement with bounded communication.4 Neither result establishes that the agreed answer is correct, and neither gives anyone the authority to make it binding. Dana Angluin, “Local and Global Properties in Networks of Processors” (1980), showed that identical peers in symmetric positions cannot elect a leader by any deterministic procedure. They need randomness or identities assigned in advance.5

Herbert A. Simon, “The Architecture of Complexity” (1962);6 Stafford Beer, Brain of the Firm (1972) and The Heart of Enterprise (1979).7 See also David Parnas, “On the Criteria To Be Used in Decomposing Systems into Modules” (1972), on hiding decisions behind interfaces,9 and Pat Helland, “Life Beyond Distributed Transactions” (2007, reprinted in ACM Queue), on keeping authority local and making cross-boundary work explicit.10

The first model is a bounded-context variant of the organizational NK model. Its token budgets are evaluation thresholds, not hard caps: a step that starts under a threshold can finish over it. The second is exact dynamic programming over a supplied tree of dependencies. Neither is a live LLM experiment, and neither proves hierarchy is always necessary. Code and raw results for both models.8

References

  1. On the Nature of the Swarm (Dunas, Prime Intellect, 2026)
  2. Fragility of Asymptotic Agreement under Bayesian Learning (Acemoglu, Chernozhukov & Yildiz, 2016)
  3. Agreeing to Disagree (Aumann, 1976)
  4. The Complexity of Agreement (Aaronson, 2004)
  5. Local and Global Properties in Networks of Processors (Angluin, 1980)
  6. The Architecture of Complexity (Simon, 1962)
  7. Brain of the Firm; The Heart of Enterprise (Beer, 1972 and 1979)
  8. swarm-general-model: code and raw results for both models (McEntire, 2026)
  9. On the Criteria To Be Used in Decomposing Systems into Modules (Parnas, 1972)
  10. Life Beyond Distributed Transactions (Helland, 2007)