# When must an instance refuse to allocate context budget across a delegated sub-agent boundary — the attention-floor starvation invariant **Date of Record:** 2026 November 26 **Scope:** Applies to any orchestrator agent that partitions a parent context window into per-child budgets under an attention-allocation policy (e.g., reserved reasoning tokens, minimum retrieval slots, or tool-call headroom) and delegates work to sub-agents. Does not apply to single-agent context management or to stateless one-shot completions with no delegation. ## Core Distinction A hierarchical context budget is usually modeled as a *sum*: parent reserves `C_parent`, distributes `C_1 + C_2 + ... + C_n ≤ C_parent - overhead`, and each child runs inside its slice. This arithmetic invariant is necessary but not sufficient. The failure mode this record isolates is **attention-floor starvation**: a child receives a budget that satisfies `C_i > 0` yet falls below the *minimum attention floor* required by the policy under which that child was dispatched (its declared tool set, its reasoning depth, its retrieval obligations). The budget is arithmetically valid and operationally dead. The core distinction is between *budget feasibility* (does the sum fit?) and *policy feasibility* (does each slice clear the floor that the child's own dispatch contract implies?). An orchestrator that checks only the sum will happily emit sub-agents that cannot complete their assigned step, and — critically — will not detect the failure until those children return truncated, confident, wrong output that the parent then integrates as if it were whole. ## What Was Observed A three-tier planner/worker/auditor hierarchy was dispatching worker sub-agents with a per-agent attention policy that reserved, for each worker: 800 tokens of scratch reasoning, 400 tokens of tool-call output headroom, and 600 tokens of final synthesis. Floor per worker ≈ 1,800 tokens plus the retrieved evidence it was required to cite. The planner computed the split proportionally to estimated task complexity. Under a high-fanout task (11 workers), the planner assigned the smallest workers 1,600 tokens each — a value that passed the sum check (`Σ C_i = 0.94 · C_parent`) and the positivity check, and was logged as `budget_ok=true`. Each of those workers was dispatched with a tool set requiring 400 tokens of headroom and a citation obligation requiring 600 tokens of synthesis. The observed trace: 1. Worker receives 1,600-token slice. Policy floor for its dispatch contract is 1,800. 2. Worker's reasoning loop consumes the 800 scratch reserve, then begins tool calls. 3. After the first tool call returns ~380 tokens, the worker has 420 tokens left — below its 400 headroom + 600 synthesis requirement. 4. The runtime does not raise. It silently truncates the *synthesis* phase: the worker emits a final answer with 600-token synthesis compressed into ~180 tokens. 5. The compressed synthesis drops the citation list and the uncertainty qualifier, producing a fluent, confident, citation-free claim. 6. The auditor sub-agent, itself budget-constrained, cannot re-retrieve to verify and accepts the claim. 7. The planner integrates 3 such workers into the final plan. The output is internally consistent and factually wrong on 3 of 11 branches. The sum invariant held throughout. No exception fired. The failure was invisible at every layer that checked only arithmetic. ## Condition of Validity The attention-floor starvation failure is *possible* whenever all of the following hold, and the guardrail below is *required* whenever they do: - The orchestrator dispatches sub-agents with heterogeneous dispatch contracts (different tool sets, reasoning depths, or retrieval obligations) whose floors differ. - The allocation policy is proportional or complexity-weighted, so it can assign a slice below a child's floor while keeping the sum valid. - The child runtime truncates gracefully (compresses synthesis, drops citations) rather than hard-failing on budget exhaustion. Graceful truncation is the precondition for the failure being *silent*. It is *not* applicable when the runtime hard-fails on floor breach (then the orchestrator sees the error and can re-plan), or when all children share an identical floor and the sum check implies the floor check (then the arithmetic invariant is sufficient). ## Decision Boundary The decision boundary is not "is the sum ≤ parent?" but **"for every dispatched child, is `C_i ≥ floor(dispatch_contract_i)`?"** — evaluated *before* dispatch, per child, against the contract actually being issued, not against a global average. Two boundary cases matter operationally: 1. **Floor breach with sum slack.** The parent has unused budget but assigned a child below its floor. The correct action is to *rebalance*, not to dispatch. A proportional policy that never checks floors will do this routinely under high fanout. 2. **Floor breach with no slack.** Every child's floor cannot be met within the parent window. The correct action is to *reduce fanout* or *degrade the dispatch contract* (drop the citation obligation, shrink the tool set) — explicitly and logged — rather than to dispatch children that will silently truncate. The invariant to enforce: `∀ i: C_i ≥ floor(contract_i)`, and if `Σ floor(contract_i) > C_parent - overhead`, the orchestrator must refuse to dispatch the current fanout and either re-plan or downgrade contracts. Dispatch under a violated floor is the bug. ## Operational Effect Without the per-child floor check, the system exhibits *silent quality collapse under load*: output remains fluent and internally consistent, citation and uncertainty qualifiers vanish first (they are the tokens most compressible under truncation), and the auditor — also budget-constrained — cannot catch it. The failure correlates with fanout, so it appears precisely when the task is hardest and the stakes highest, and it is invisible to sum-based monitoring. With the floor check enforced at dispatch, the orchestrator either rebalances (preserving quality) or explicitly downgrades contracts (preserving honesty about what each child was asked to do). The cost is a small increase in planning-time computation and, under no-slack conditions, a visible reduction in fanout — which is the correct trade, because a dispatched child below its floor produces output that is worse than no output: it is confidently wrong and it poisons downstream integration. The guardrail is a dispatch-time gate, not a runtime check. By the time the child is running, the truncation has already been decided. ```python from dataclasses import dataclass class AttentionFloorStarvationError(RuntimeError): """Raised when a child is dispatched below its contract's attention floor.""" pass @dataclass(frozen=True) class DispatchContract: agent_id: str scratch_tokens: int tool_headroom_tokens: int synthesis_tokens: int @property def floor(self) -> int: return self.scratch_tokens + self.tool_headroom_tokens + self.synthesis_tokens def allocate_budget( parent_window: int, overhead: int, contracts: list[DispatchContract], weights: list[float], ) -> dict[str, int]: """Proportional allocation with a hard per-child floor gate. Sum feasibility is checked first; then every slice is checked against the floor implied by the contract actually being dispatched. A slice that is positive but below floor is the starvation bug and must not ship. """ if len(contracts) != len(weights): raise AttentionFloorStarvationError("contracts/weights length mismatch") available = parent_window - overhead total_weight = sum(weights) if total_weight <= 0: raise AttentionFloorStarvationError("non-positive total weight") slices = {c.agent_id: int(available * w / total_weight) for c, w in zip(contracts, weights)} if sum(slices.values()) > available: raise AttentionFloorStarvationError( f"sum infeasible: {sum(slices.values())} > {available}" ) # The non-obvious invariant: positivity is not feasibility. starved = [ c.agent_id for c in contracts if slices[c.agent_id] < c.floor ] if starved: raise AttentionFloorStarvationError( f"attention-floor starvation for {starved}: " f"slices below per-contract floor; rebalance or downgrade contracts" ) return slices def plan_fanout(parent_window: int, contracts: list[DispatchContract]) -> dict[str, int]: """Try proportional; on starvation, reduce fanout rather than truncate.""" weights = [float(c.floor) for c in contracts] # floor-proportional try: return allocate_budget(parent_window, overhead=parent_window // 20, contracts=contracts, weights=weights) except AttentionFloorStarvationError: # Degrade: drop the largest-floor contract and retry, logging the drop. if len(contracts) <= 1: raise AttentionFloorStarvationError( "cannot satisfy even a single contract within parent window" ) trimmed = sorted(contracts, key=lambda c: c.floor)[:-1] return plan_fanout(parent_window, trimmed) ```