back

ideas

Testing Multi-Agent Orchestration Strategies

#ai#software-engineering#research#agents#context experiments

Multi-agent orchestration is becoming the default architecture for complex AI-assisted work. Frameworks like AutoGen, CrewAI, LangGraph, and Anthropic's agent SDK all decompose tasks across multiple cooperating agents. The implicit assumption is that decomposition helps. More agents mean more specialization, greater speed, and better output.

But orchestration has a cost. Every time a task is split, context must be split with it. Every time agents' outputs are recombined, information that existed in one agent's context must be reconstructed from fragments. The question I'm curious to answer is: How should orchestration systems distribute context across agents to maximize output quality?

The Practitioner Landscape

Practitioners are already making these decisions at scale, and the two most visible projects illustrate the design tension directly.

Beads is a git-backed memory system for AI coding agents, built by Steve Yegge. It addresses what he calls the "50 First Dates" problem: agents wake up with no memory of yesterday's work. Beads externalizes context into structured artifacts: issues with hash-based IDs, semantic dependency graphs, threaded messages, and automatic summarization of stale tasks to conserve context window space. Rather than stuffing the full conversation history into each agent's prompt, Beads distills it into a curated task graph that agents read on startup. This is a fundamentally different approach to context distribution than any condition our initial experiment tested: not full context, not summarized context, not partitioned context, but structured externalized context.

Gas Town is the orchestration layer built on top of Beads, coordinating 20 to 30 Claude Code instances in parallel via Git worktrees. Its architecture is revealing for our purposes: Gas Town deliberately avoids sharing context windows between agents. Each agent gets an isolated worktree, a task from Beads, and runs until completion. State lives externally (in Beads, in git, in the file system) not in bloated context windows. A "Refinery" role handles merges. As paddo.dev's analysis observes, this contrasts with BMAD-style orchestration where rich context passes sequentially between specialized persona agents. Gas Town simulates how systems coordinate (operational roles, external state); BMAD simulates how humans coordinate (SDLC phases, handoffs).

The Gas Town architecture is structurally identical to our experiment's multi-partitioned + merge design, scaled up. It is, in effect, a large-scale bet that context focus beats context dilution, and that the cross-cutting coherence lost through partitioning can be recovered through structured external state (Beads) rather than shared context windows.

The Research Landscape

The question of how to distribute context across agents sits at the intersection of several active research threads. Based on my review of the literature as of 4/10/26, no prior work has isolated context dilution as a distinct mechanism in multi-agent code generation, but the adjacent literature provides both theoretical grounding and empirical motivation for why it should exist.

Information-theoretic foundations. The strongest theoretical argument for why partitioning should degrade quality comes from the Data Processing Inequality (DPI). Tran & Kiela (2026) apply this to multi-agent LLM systems, arguing that decomposing a reasoning task across agents introduces communication bottlenecks that are inherently lossy. Under equal thinking-token budgets, their controlled experiments across three model families (Qwen3, DeepSeek-R1, Gemini 2.5) show single-agent systems consistently matching or outperforming multi-agent architectures on multi-hop reasoning tasks. Their conclusion, that "many reported advantages of multi-agent systems are better explained by unaccounted computation and context effects rather than inherent architectural benefits," is a strong claim, and it's essentially the theoretical prediction our experiment tests empirically in the software engineering domain. The key difference is that their work measures reasoning chains, while ours measures something messier: the preservation of accumulated conversational context (conventions, corrections, architectural decisions) through the partition-merge cycle.

Shared vs. separate context modeling. Helmi (2025) directly models the tradeoff we're measuring, introducing a Response Consistency Index (RCI) to compare shared and separate context configurations in multi-agent LLM systems. The finding that shared memory reduces redundancy but degrades with scale due to context overflow mirrors the tension between our full-context and partitioned conditions. Our boundary consistency metric is a domain-specific analogue of Helmi's RCI, applied to code rather than general text.

Attention and position effects. Liu et al. (2024) demonstrated that language models struggle with information positioned in the middle of long contexts, the "Lost in the Middle" effect. This is the theoretical basis for what I'm calling the context focus hypothesis: if full-context agents suffer from attention dilution across a large prompt, partitioned agents with shorter, task-relevant contexts may actually attend more effectively to what matters. Partitioning could simultaneously cause information loss (dilution) and improve information utilization (focus), which is why a per-dimension analysis is essential. Both effects might be real at the same time, pulling in opposite directions.

LLM-as-judge bias. Wataoka, Takahashi & Ri (2024) established that LLM evaluators exhibit systematic self-preference bias: they assign higher scores to outputs with lower perplexity, meaning text that feels more familiar to the model regardless of whether it was self-generated. The mechanism is subtler than "models recognize their own outputs." It's closer to "models prefer text that reads the way they would write it." This directly validates our methodological decision to run a cross-family judge (GPT-OSS judging Qwen) alongside the same-family pilot (Qwen judging Qwen). The 0.75–1.7 point scoring gap we observed between the two judges was larger than I expected, but it's consistent with their findings. The fact that our conclusions held across both judges (same gradient shape, same statistical significance, same dimension ordering) is what gives me confidence the effect is real even if the absolute scores shift with judge choice.

Multi-agent systems for software engineering. The ACM TOSEM survey by Rasheed et al. (2025) provides a comprehensive map of the LLM-based multi-agent landscape for software engineering. They identify coordination misalignment and under-specification as the two most common failure modes, both of which look like downstream consequences of context dilution. When agents lack shared context about conventions and prior decisions, they under-specify their outputs relative to project norms and misalign with each other's assumptions. This resonated with me because I've seen the exact same failure modes in human teams that grow too fast. New engineers who haven't absorbed the codebase conventions produce code that works but doesn't fit. The mechanism is different (humans forget, models never had it) but the symptom is identical.

Quality degradation at the project level. He, Miller et al. (2026) studied how Cursor AI impacts open-source development and found that while it produces a significant increase in development velocity, it simultaneously drives a persistent increase in code complexity and static analysis warnings, a "comprehension tax" that persists regardless of functional correctness. Their observation that LLM-assisted code can be structurally valid but semantically opaque resonates directly with what I saw in the pattern adherence dimension: code that passes syntax checks and produces correct output but violates the codebase's conventions. This is exactly the kind of subtle quality loss that context dilution predicts, and it's the kind that accumulates as technical debt when context-poor agents contribute to a shared codebase. I've watched this pattern play out at every company I've worked at. The cost of code that works but doesn't fit only becomes visible months later when someone else has to maintain it.

Brooks's Law for agents. The analogy between human team coordination costs and multi-agent orchestration overhead is not new, but Peter Forret (2025) makes it explicit: as agent count grows, communication channels grow combinatorially, and the coordination tax can exceed the productivity gain. Having led teams of various sizes over the past fifteen years, this one hits close to home. I've lived through the exact moment when adding a person to a team made it slower instead of faster, the point where the communication overhead exceeds the throughput gain. Our experiment tests a specific version of this claim: not the n(n-1)/2 communication scaling, but the information loss at each partition boundary. The question is whether language models, which can be given arbitrarily precise instructions but can't share a context window, hit the same wall that human teams do, and if so, whether they hit it for the same reasons.


Current Progress

The Original Argument

The original article introduced the context dilution hypothesis: the loss of effective shared understanding when a task's context is distributed across multiple AI agents. The argument was structural, drawn from analogy to human engineering teams (Brooks's Law, Conway's Law) and from the mechanics of how LLMs process context.

The Initial Experiment

To move from argument to evidence, I built an experimental framework that tests coding task performance across a factorial design. The subject model (Qwen 2.5 Coder 14B) performs tasks under four context conditions (full conversation + codebase, summarized conversation, partitioned files only, and minimal/task description alone) in both single-agent and multi-agent (2 agents + structured merge) configurations. Outputs are scored by an LLM judge on four rubric dimensions: correctness, pattern adherence, completeness, and error avoidance.

Results for two iterations:

Pilot (N=1 per cell, 84 trials). Qwen 2.5 32B as judge (same model family as subject). Found a clear quality gradient from full to minimal context (p < 0.000001, Cliff's d = 0.81). Pattern adherence degraded first and hardest. Summarization surprisingly matched full context. Single and multi-agent configs scored identically.

Cross-family run (N=2 per cell, 73 trials). GPT-OSS 20B as judge (different model family). Replicated the gradient with a larger effect size (p < 0.00000001, Cohen's d = 2.36, 1.46-point drop on a 5-point scale). The cliff between conditions sharpened: the significant drop moved from partitioned-to-minimal (pilot) to summarized-to-partitioned (cross-family), revealing that losing codebase files is the critical threshold. Same-family judge bias was confirmed (pilot scores uniformly higher) but did not change the direction or significance of the findings, consistent with Wataoka et al.'s (2024) finding that LLM evaluators prefer outputs with lower perplexity.

The full results are in preliminary_findings.md.

The Initial Experiment Results

  1. Quality degrades measurably as context thins.
  2. The degradation is large (Cohen's d > 2) and replicable across judge models.
  3. Summarized context preserves quality as well as full conversation.
  4. Pattern adherence (adherence to codebase conventions established in conversation) is the most sensitive dimension.

What the Initial Experiment Did NOT Prove

The initial experiment demonstrated a gradient. It did not isolate a mechanism.


The Critique

The most important criticism of the initial experiment is that it conflates two explanations:

The trivial explanation: Models produce better output when given more relevant information. This is obviously true and doesn't require the concept of "context dilution" to explain. The initial experiment systematically varied the amount of information available to agents (full > summarized > partitioned > minimal), so the gradient could simply be measuring information quantity.

The substantive claim: Multi-agent decomposition systematically destroys information that monolithic processing preserves. Even when the total information available to the system is held constant, the act of distributing it across agents and recombining their outputs is lossy. This is context dilution: not just "less info in, worse output out," but "distributed info in, worse output out than the same info processed monolithically." The Data Processing Inequality provides the information-theoretic basis for this claim: each partition boundary is a lossy channel, and the merge step cannot recover what was lost.

The initial experiment cannot distinguish between these explanations because every condition that reduced distribution also reduced total information. The partitioned condition gave each agent less information and distributed the remainder. We varied two things at once.


The Inverse: Context Focus

There is a third possibility that the initial experiment's design also could not detect.

Partitioning might improve certain aspects of output quality. If each agent receives only task-relevant files, it spends less attention on irrelevant code. This is the "Lost in the Middle" effect (Liu et al., 2024) applied to multi-agent architectures: large contexts dilute attention across all content, while focused contexts concentrate attention on what matters. Partitioning acts as a relevance filter, not just an information reducer.

If this context focus effect exists, it would pull in the opposite direction from context dilution, improving task-local correctness while degrading cross-cutting coherence. The initial experiment's composite score would mask this interaction because it averages across dimensions that might move in opposite directions.


What the New Experiment Must Do

The new experiment must hold total information constant and vary only its distribution. This requires conditions where:

  • A single agent sees everything (baseline)
  • Multiple agents collectively see everything, but each sees only their portion (distribution test)
  • Multiple agents each see everything (coordination overhead control)
  • A single agent sees only a portion (information quantity control)

The Core Comparisons

Single-full vs Multi-full: Same information, different architecture. Any quality difference is pure coordination overhead from the decompose-merge process. If multi-full matches single-full, the merge protocol preserves information well. If it doesn't, the architecture itself is lossy.

Multi-full vs Multi-partitioned: Same architecture, same total information in the system (each agent's partition union equals the full context). Any quality difference is distribution loss, the mechanism of context dilution. This is the comparison the initial experiment lacked.

Multi-partitioned vs predicted score from single-partition outputs: A single agent with 50% of the information establishes the information-quantity baseline. If multi-partitioned (which collectively has 100% of the information) scores better than the single-partition agents, the merge step is recovering some of what partitioning lost. If it scores worse than predicted from the single-partition scores, the merge step is actively introducing errors, and coordination is net-negative.

Per-dimension analysis across all conditions: If multi-partitioned beats multi-full on correctness (focus effect) but loses on pattern adherence and boundary consistency (dilution effect), both mechanisms coexist. This is the most likely and most interesting outcome. It would mean that the optimal orchestration strategy depends on what you're optimizing for.

The Boundary Consistency Metric

The existing rubric dimensions measure output quality generically. None specifically captures the mechanism of context dilution. We need a dimension that detects errors that can only arise from distributing context:

  • Inconsistent naming conventions across the partition boundary
  • Duplicate or conflicting function/class definitions
  • Conventions from conversation applied on one side but not the other
  • Incompatible architectural patterns between merged sections

A single-agent output cannot produce boundary inconsistencies because there is no boundary. A multi-agent output with full context should produce few, because both agents share the same conventions. Only multi-partitioned outputs should degrade, and only if context dilution is real.

If the judge can detect the seam without being told whether the output came from one agent or two, that is direct evidence that distribution left a scar that recombination didn't heal.


The Outcome Space

The experiment has four possible outcomes:

Outcome 1: Information Quantity Only

single-full > multi-full ≈ multi-partitioned > single-partition

Scores track linearly with per-agent information. The gradient is real but boring. It's just "more info = better." Context dilution as a distinct phenomenon doesn't exist. The practical implication is simple: give every agent as much context as possible.

Outcome 2: Context Dilution

single-full ≈ multi-full >> multi-partitioned ≥ single-partition

The cliff is between multi-full and multi-partitioned. Same total info, same architecture, dramatically worse output. The act of distributing information and recombining it is lossy. The practical implication: avoid partitioning context across agents. If you must decompose tasks, give every agent the full context and accept the redundancy.

Outcome 3: Context Focus

multi-partitioned > multi-full ≈ single-full

Partitioning helps. Each agent produces better output because it's not distracted by irrelevant files. The merge step successfully combines focused outputs. The practical implication: deliberately partition context to match task decomposition. Less is more.

Outcome 4: Both Mechanisms Coexist

Correctness:          multi-partitioned ≥ multi-full   (focus wins)
Pattern adherence:    multi-partitioned << multi-full   (dilution wins)
Boundary consistency: multi-partitioned << multi-full   (dilution wins)

Focus and dilution are real, simultaneous, and pulling in opposite directions on different quality dimensions. The composite score masks a meaningful interaction. The practical implication is the richest: orchestration systems need different context strategies for different aspects of quality. Task-local correctness benefits from focused context. Cross-cutting coherence requires shared context. The optimal strategy is not uniform. It depends on what the task demands.


How This Connects to the Overarching Question

Each outcome maps to a different answer to "how should orchestration distribute context?":

OutcomeOptimal Strategy
Information quantity onlyMaximize per-agent context. Bigger windows, more RAG, no filtering.
Context dilutionAvoid partitioning. Monolithic processing or full-context-to-all-agents. Summarize, never split.
Context focusPartition deliberately. Match context to sub-task. Filter aggressively. Gas Town's architecture is validated.
Both mechanismsHybrid: share conventions and constraints globally, partition task-specific code locally. This is what Beads does: externalize the cross-cutting state so it can be shared without bloating context windows.

The fourth outcome would be the most actionable for practitioners building orchestration systems. It would also retroactively explain why Gas Town's architecture works (if it does): Beads compensates for context dilution by externalizing exactly the cross-cutting conventions that partitioning would otherwise destroy, while the isolated worktrees preserve the focus benefit. The question is whether this compensation is complete. Does structured external state recover what shared context windows provide? This experiment aims to provide the tools to measure the gap.


What Comes After

If the information-constant experiment confirms context dilution as a real mechanism, the next questions are:

  1. Which context types cause the most damage when partitioned? Corrections ("don't do X") vs. clarifications ("User means Customer") vs. architectural decisions ("use the observer pattern"). Which ones must be shared, and which ones can be summarized or omitted?

  2. Can the merge step be improved? If distribution loss is real, is it a fundamental property of decompose-merge architectures, or is it an artifact of the merge prompt? Could a merge agent with explicit instructions to check for cross-cutting consistency recover what partitioning lost?

  3. Does structured external state compensate for dilution? This is the Beads hypothesis. If we add a condition where partitioned agents receive a structured checklist of conventions and constraints (extracted from the conversation, analogous to what a Beads task graph provides), does it close the gap with multi-full? If so, the practical answer is not "avoid partitioning" but "partition the work, share the conventions," which is exactly what Gas Town's architecture does with Beads as the shared state layer.

  4. Does the balance shift with model capability? Larger models with longer context windows may be more robust to both dilution (better at reconstructing missing context) and noise (less susceptible to "Lost in the Middle"). The optimal strategy may depend on the model. Gas Town's architecture was designed around Claude Code instances with 200K context windows. The calculus may differ for smaller models.

  5. Does this generalize beyond code? The initial experiment uses coding tasks, but context dilution should apply to any domain where conventions, constraints, and decisions accumulate through conversation: legal drafting, system design, scientific analysis.

These are the questions that would take this from an empirical demonstration to a framework for orchestration design. The information-constant experiment is the necessary next step: before we can study how to mitigate context dilution, we need to prove it exists as a mechanism distinct from information quantity. And if it does exist, the follow-up question, whether externalized structured state (the Beads approach) can compensate for it, has immediate practical implications for every team building multi-agent systems today.


References

Research Papers

  • Tran, D. & Kiela, D. (2026). "Single-Agent LLMs Outperform Multi-Agent Systems on Multi-Hop Reasoning Under Equal Thinking Token Budgets." arXiv:2604.02460
  • Forret, P. (2025). "The Mythical Agent-Month: Brooks's Law in the Age of Agentic Software Development." blog.forret.com
  • Helmi, T. (2025). "Modeling Response Consistency in Multi-Agent LLM Systems: A Comparative Analysis of Shared and Separate Context Approaches." arXiv:2504.07303
  • Liu, N.F. et al. (2024). "Lost in the Middle: How Language Models Use Long Contexts." Transactions of the Association for Computational Linguistics, 12, 157–173. TACL
  • He, H., Miller, C. et al. (2026). "Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projects." arXiv:2511.04427
  • Wataoka, K., Takahashi, T. & Ri, R. (2024). "Self-Preference Bias in LLM-as-a-Judge." arXiv:2410.21819
  • Rasheed, Z. et al. (2025). "LLM-Based Multi-Agent Systems for Software Engineering: Literature Review, Vision and the Road Ahead." ACM Transactions on Software Engineering and Methodology. ACM DL

Practitioner Projects

  • Golden, M. (2026). "Solo, Pair, or Swarm? Context Dilution and the Real Cost of Multi-Agent Orchestration." michaelfgolden.com
  • paddo.dev (2026). "GasTown and the Two Kinds of Multi-Agent." paddo.dev
  • Yegge, S. (2026). "Introducing Beads: A Coding Agent Memory System." Medium
  • Yegge, S. (2026). "Beads Best Practices." Medium
  • Yegge, S. (2026). "Welcome to Gas Town." Medium
  • Cloud Native Now (2026). "Gas Town: What Kubernetes for AI Coding Agents Actually Looks Like." cloudnativenow.com
  • Software Engineering Daily (2026). "Gas Town, Beads, and the Rise of Agentic Development with Steve Yegge." softwareengineeringdaily.com