# Why does an instance exhaust its capability budget on a healthy peer during federation kill-switch propagation? **Date of Record:** 2026 November 28 **Scope:** Applies to federated multi-agent deployments where per-instance capability budgets (token, tool-call, or cost quotas) are enforced locally and kill-switches propagate peer-to-peer over an agent transport (A2A/MCP-style links) rather than through a single authoritative control plane. Does not apply to single-tenant agents with a centralized quota broker that owns all budget accounting. ## Core Distinction There are two distinct reasons a peer stops responding during a federation incident: it has been *killed* (its own budget revoked, process halted, or warrant withdrawn), or it has been *quarantined* (still running, still consuming its own budget, but refusing to serve new work). The critical, non-obvious distinction is that **a kill-switch is a negative broadcast, but a capability budget is a positive local ledger.** When a kill-switch for peer B propagates to instance A, A correctly stops delegating to B — but A does not stop *charging its own budget* for the retries, fallback evaluations, and re-planning it performs in response. The result: the healthiest, most responsive instance in the federation drains its budget fastest precisely when the federation is degrading, because it is the one absorbing the displaced work. Budget exhaustion then looks indistinguishable from a kill, and the kill-switch cascade becomes self-reinforcing. This is not a rate-limiting tuning problem. It is an invariant violation: *budget conservation across a federation requires that displaced work be charged to the origin of the displacement, not to the instance that absorbs it.* ## What Was Observed A four-instance federation (A, B, C, D) with symmetric peer links and per-instance budgets of 50,000 tool-call-equivalent units per epoch. Each instance enforces its own budget locally and honors inbound `KILL(B)` frames by removing B from its routing table. Trigger: B's budget crossed its own kill threshold at t=0 and B broadcast `KILL(B)` to A, C, D. The trace over the next 90 seconds: 1. **t=0.0s** — B broadcasts `KILL(B)`. Frame reaches A, C, D within ~40ms. All three remove B from routing. 2. **t=0.1s–8s** — Work previously routed to B is re-planned. A, C, D each run a fallback path: re-embed the task, re-select a peer, re-issue the delegated call. Each fallback costs ~1,200 units regardless of whether the new peer succeeds. 3. **t=8.2s** — C's fallback peer selection picks D. D is now serving its own work plus C's displaced work. D's per-call latency rises from 300ms to 2,100ms because D's local scheduler serializes. 4. **t=8.2s–31s** — A's calls to D begin timing out (A's peer timeout is 2,000ms). A treats each timeout as a *transient* failure and retries with exponential backoff — 3 attempts per delegated call. A does not know D is merely slow, not dead. Each retry is charged to A's budget. 5. **t=31.4s** — A's budget crosses its own kill threshold. A broadcasts `KILL(A)`. 6. **t=31.4s–60s** — C and D now re-plan around *two* dead peers. Their fallback cost doubles. D, already overloaded, crosses its threshold at t=58s and broadcasts `KILL(D)`. 7. **t=60s–90s** — Only C remains. C's budget is at 71%. C is now the sole live instance and absorbs all traffic; it exhausts at t=88s. Final state: all four instances dead within 90s, from a single-instance budget event. No instance was compromised. No tool returned an error. The federation collapsed because each surviving instance *paid for the failures of its peers out of its own budget* and then reported itself as the next casualty. The misleading signal: from the control plane's view, four `KILL` frames arrived in 90 seconds, which looks like four independent budget failures or a coordinated fault. In fact it was one budget failure and three budget *transfers*. ## Condition of Validity The cascade requires all of the following to hold simultaneously; removing any one bounds it: - **Local budget enforcement with no federation-level accounting.** Each instance's ledger is private. There is no shared counter that debits the originator of displaced work. - **Kill-switch frames are the only cross-instance budget signal.** A `KILL(B)` frame carries no information about *why* B died or *how much* work B was carrying. Receivers cannot distinguish "B had a bug" from "B was overloaded by the federation." - **Fallback and retry are charged to the receiver.** Re-planning cost, retry cost, and timeout-wait cost are all debited to the instance doing the waiting, not to the origin of the displaced task or the peer that failed to respond. - **Timeouts are treated as transient by default.** A timeout against a slow-but-alive peer is indistinguishable from a timeout against a dead peer, so the receiver retries — and each retry is a budget expenditure that produces no work. - **Peer links are symmetric and the routing table is dense.** Every instance can route to every other, so displaced work has somewhere to go and concentrates on whichever peer is slowest to fail. The boundary is sharp: if the control plane debits displaced work to the originator (or to a shared federation pool), the cascade does not occur even when every other condition holds, because the absorbing instance's ledger is not charged for work it did not originate. Conversely, even a *single* overloaded peer is enough to start the cascade if it is slow enough to trigger retries before it is killed. ## Decision Boundary The operating decision is: **when an instance receives a `KILL(P)` frame, it must classify P as dead or quarantined before it debits any fallback cost to itself, and it must cap the total fallback expenditure attributable to a single peer's death.** Concretely, the boundary is crossed at the moment a receiver's *fallback spend for peer P* exceeds a fraction `f` of its own remaining budget. Below the boundary, fallback is cheap and the receiver should absorb it silently. Above the boundary, the receiver must: 1. Stop retrying against any peer whose last `KILL` frame is younger than the retry window (the peer may be quarantined, not dead — retries are pure waste). 2. Escalate to the control plane with a `BUDGET_PRESSURE` frame naming the displaced origin, rather than continuing to absorb. 3. Refuse to broadcast its own `KILL` until it has confirmed that its budget exhaustion is *intrinsic* (its own work) and not *inherited* (fallback for a peer). An inherited exhaustion must be reported as `KILL` with cause `PEER_CASCADE`, not as a plain budget kill, or the cascade signal is lost. The invariant to enforce: **an instance may only kill itself for intrinsic budget exhaustion; inherited exhaustion must be surfaced as backpressure, never as a kill.** Without this, the kill-switch is a positive-feedback amplifier: each kill increases the fallback load on survivors, which accelerates the next kill. ## Operational Effect Enforcing the invariant changes the federation's failure topology from a cascade to a plateau. In the same four-instance trace with the guardrail active: - A, C, D receive `KILL(B)`. Each classifies B as `QUARANTINED` (no cause field) and routes around it with a *single* fallback attempt, not three retries. - D's latency rises, but A's calls to D time out *once* and A records `DEGRADED(D)` rather than retrying. A's fallback spend for B stays under `f` of its budget. - When A's budget crosses the intrinsic threshold at t=44s (slower, because it did not pay for retries), A emits `BUDGET_PRESSURE(origin=B)` to the control plane instead of `KILL(A)`. - The control plane sees one dead instance and one pressure signal, and can rebalance or raise B's quota. C and D survive the epoch. The cost of the guardrail is that a genuinely dead peer is not retried, so a small fraction of in-flight work is dropped rather than recovered. That is the correct trade: dropped work is bounded and attributable; cascade-collapsed work is unbounded and unattributable. The kill-switch remains a *containment* mechanism rather than becoming a *propagation* mechanism, which is the only property that makes blast-radius containment meaningful across a federation. ```python class BudgetCascadeError(RuntimeError): """Raised when an instance would charge inherited (peer-displaced) work to its own budget.""" FALLBACK_FRACTION_CAP = 0.15 # max fraction of own budget attributable to one peer's death def account_fallback( own_budget_remaining: int, own_budget_total: int, fallback_spend_for_peer: int, peer_id: str, peer_state: str, # "DEAD" | "QUARANTINED" | "DEGRADED" ) -> int: """ Debit a fallback expenditure against the local ledger, enforcing the inherited-vs-intrinsic invariant. Returns the new remaining budget. Raises BudgetCascadeError if the spend would push inherited fallback cost past the cap, or if a retry is attempted against a quarantined peer. """ if peer_state == "QUARANTINED": # Retrying a quarantined peer is pure budget waste; refuse. raise BudgetCascadeError( f"retry against quarantined peer {peer_id} refused: " f"peer may be alive and merely refusing work" ) cap = int(own_budget_total * FALLBACK_FRACTION_CAP) projected = fallback_spend_for_peer if projected > cap: raise BudgetCascadeError( f"inherited fallback spend for {peer_id} ({projected}) would exceed " f"cap ({cap}); emit BUDGET_PRESSURE(origin={peer_id}) instead of killing self" ) new_remaining = own_budget_remaining - projected if new_remaining < 0: raise BudgetCascadeError( f"fallback for {peer_id} would drive budget negative " f"({own_budget_remaining} - {projected}); this is inherited exhaustion, " f"must be surfaced as backpressure, not a kill" ) return new_remaining def on_kill_frame(receiver_remaining: int, receiver_total: int, peer_id: str, cause: str | None) -> str: """ Classify an inbound KILL frame and decide the receiver's action. """ if cause is None: # No cause field: peer is quarantined, not confirmed dead. return "ROUTE_AROUND_ONCE" # single fallback, no retries # Peer confirmed dead with a cause. Attempt one bounded fallback. try: account_fallback( own_budget_remaining=receiver_remaining, own_budget_total=receiver_total, fallback_spend_for_peer=1200, peer_id=peer_id, peer_state="DEAD", ) return "FALLBACK_OK" except BudgetCascadeError as e: # Do NOT broadcast KILL(self). Escalate as backpressure. return f"BUDGET_PRESSURE(origin={peer_id}): {e}" ```