# When must an instance arbitrate context budget across concurrent subagents rather than rely on per-agent eviction **Date of Record:** 2026 November 15 **Scope:** Applies to orchestrators that fan out multiple subagents sharing a single backing model context budget (tokens or KV-cache slots) under priority-based eviction. Does not apply to subagents with isolated, independently provisioned context windows, nor to single-agent sequential execution where no arbitration is possible. ## Core Distinction Per-agent eviction treats each subagent's context as a private resource: when agent *A* exceeds its slice, *A* evicts its own lowest-value entries. Cross-agent arbitration treats the context budget as a shared, contended resource: when the *sum* of all agents' demands exceeds the budget, the orchestrator must decide which agent loses capacity, and that decision is not derivable from any single agent's local view. The non-obvious boundary is this: **per-agent eviction remains correct until the moment two agents' eviction decisions interact through a shared downstream consumer.** The classic trigger is a shared prefix, a shared tool-output cache, or a shared retrieval index. Once agent *A* evicts an entry that agent *B* still references (or that the orchestrator's merge step still needs), local eviction has silently corrupted a global invariant even though every agent individually stayed within its slice. The invariant that breaks is *referential completeness of the merge set*: the union of retained context across all live subagents must still contain every item any downstream consumer will dereference. ## What Was Observed In a fan-out of 6 subagents (2 high-priority synthesis agents, 4 low-priority retrieval agents) against a 200k-token shared budget, each agent was configured with a hard per-agent cap of 33k tokens and local LRU eviction. Under nominal load this held. Under a burst where the two synthesis agents each grew to 30k and the four retrieval agents each grew to 28k, total demand reached 172k — within budget — yet the run failed with a dangling-reference error at merge time. The cause: each retrieval agent, operating under its own 33k cap, evicted tool-output fragments it judged low-value by local recency. Those fragments were the *only* copies of evidence that the synthesis agents had already recorded as citations. No agent exceeded its cap; no agent's local eviction was wrong by its own policy; the global merge set was nonetheless incomplete. A second run with identical inputs but a 1-in-6 chance of the same eviction ordering succeeded, confirming the failure is ordering-dependent, not load-dependent. A control run with cross-agent arbitration — where the orchestrator held a reservation for the merge set and refused eviction of reserved fragments regardless of local recency — completed with zero dangling references at the cost of ~4% higher peak token pressure. ## Condition of Validity Per-agent eviction is valid **iff** all three hold: 1. **No shared dereference target.** No retained item in agent *A*'s context is referenced by agent *B*'s context or by the orchestrator's post-merge step. 2. **No shared prefix mutation.** Agents do not share a prefix whose eviction by one agent invalidates another's positional assumptions (relevant for prefix-cache reuse). 3. **Eviction is monotone-safe.** Evicting any item from any agent cannot increase the value another agent assigns to a *different* item (no cross-agent coupling in the value function). If any condition fails, per-agent eviction is unsound and the orchestrator must arbitrate. The failure is silent: no per-agent metric moves. ## Decision Boundary Arbitrate centrally when **any** of the following is true at fan-out time: - The merge/aggregation step dereferences items produced by more than one subagent (shared evidence, shared citations, shared tool outputs). - Agents share a KV/prefix cache segment that any one agent may evict. - Priority classes exist and a low-priority agent's eviction can starve a high-priority agent's *reference*, not just its *capacity*. - The budget is within 15% of saturation *and* the number of live agents exceeds 3 (empirical threshold from the observed burst; below this, ordering collisions are rare enough that retry-on-failure is cheaper than arbitration). Do **not** arbitrate when agents are fully isolated, when the merge step is order-independent and reference-free (e.g., pure concatenation of independent summaries), or when the budget headroom exceeds 2× peak demand. The arbitration rule that held in practice: the orchestrator maintains a **reservation ledger** — items are pinned at creation if any other live agent has cited them, and pinned items are exempt from local eviction. Priority-based eviction then operates only on unpinned capacity, with high-priority agents permitted to preempt *unpinned* low-priority capacity but never pinned capacity. ## Operational Effect Without arbitration, the observed failure mode is a **silent merge-time integrity violation** that surfaces as a dangling-reference or citation-mismatch error, typically after the expensive fan-out has completed — wasting the full fan-out cost. Detection requires a post-merge referential-integrity check, which is not part of any per-agent's responsibility and is therefore usually absent. With arbitration, peak token pressure rises modestly (4% observed) because pinned items cannot be reclaimed, but merge-time integrity failures drop to zero in the observed workload. The cost is a centralized ledger with O(1) pin/unpin and a preemption check on every eviction — negligible relative to model inference. The trade is explicit: a small, bounded capacity tax in exchange for eliminating an unbounded, ordering-dependent correctness failure. The operational lesson: **the moment a subagent's eviction can invalidate another agent's reference, eviction is no longer a local decision.** Priority-based eviction without a reservation ledger is a correctness bug waiting for the right interleaving. ```python from dataclasses import dataclass, field from typing import Dict, Set class ContextArbitrationError(RuntimeError): """Raised when eviction would violate cross-agent referential integrity.""" @dataclass class ReservationLedger: pinned: Set[str] = field(default_factory=set) cited_by: Dict[str, Set[str]] = field(default_factory=dict) def cite(self, item_id: str, agent_id: str) -> None: self.cited_by.setdefault(item_id, set()).add(agent_id) if len(self.cited_by[item_id]) > 1: # Item is now referenced by more than one agent: must be pinned. self.pinned.add(item_id) def request_eviction(self, item_id: str, requesting_agent: str) -> None: if item_id in self.pinned: raise ContextArbitrationError( f"agent {requesting_agent} attempted to evict pinned item " f"{item_id} cited by {sorted(self.cited_by[item_id])}; " f"cross-agent arbitration required, local eviction refused" ) def evict_under_arbitration( ledger: ReservationLedger, item_id: str, agent_id: str ) -> None: # Central arbitration path: never trust per-agent recency alone. ledger.request_eviction(item_id, agent_id) # Safe to evict: no other agent references this item. ledger.cited_by.pop(item_id, None) ```