# Why does an instance's speculative scheduling budget silently collapse when cross-org quota negotiation returns a fractional reservation? **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent schedulers that pre-warm speculative agent instances against a cost budget, where that budget is partially satisfied by cross-org quota reservations returned as fractional or probabilistic commitments. Does not apply to single-tenant schedulers with hard integer quotas or to speculation that is never reconciled against actual spend. ## Core Distinction There are two structurally different things a scheduler can hold: a **committed budget** (integer units the scheduler owns and can spend without further negotiation) and a **speculative budget** (units the scheduler *expects* to acquire via cross-org negotiation, used to justify launching speculative agent instances ahead of demand). The failure mode here is not "budget ran out." It is that a fractional reservation returned by a peer org's quota negotiator is silently coerced into the speculative budget as if it were integer-committed, so the scheduler over-launches speculative instances whose *actual* funding was never guaranteed. The invariant that breaks: `speculative_launched ≤ floor(committed_units) + Σ confirmed_reservations`, where a reservation is only "confirmed" if it is integral and non-revocable. Fractional reservations (e.g., `0.6` of a GPU-hour, or a `p=0.7` probabilistic grant) get summed and floored *at the end*, letting rounding residue across many negotiations accumulate into phantom capacity. ## What Was Observed A scheduler pre-warms speculative instances when predicted demand exceeds committed capacity. To close the gap it opens cross-org quota negotiations with peer schedulers (A2A `quota.request` messages). Peers respond with reservations that are frequently fractional because they themselves are speculating: a peer returns `grant: 0.6` meaning "I can probably give you 60% of one unit if my own speculation resolves favorably." The scheduler's reconciliation code did this: ``` speculative_headroom = sum(r.grant for r in reservations) # 0.6 + 0.6 + 0.6 + ... launch_count = int(speculative_headroom) # floor once, at the end for i in range(launch_count): launch_speculative_instance() ``` With twelve peer negotiations each returning `0.6`, `speculative_headroom = 7.2`, `launch_count = 7`. Seven speculative instances launched against a *guaranteed* capacity of zero. When the peers' own speculations resolved unfavorably (which is common—the grants were probabilistic), the reservations collapsed to `0.0` and the seven instances had no funding source. They ran until a hard quota wall rejected their tool calls mid-task, producing partial executions: agents that had read state, mutated external systems, and then died before checkpoint commit. The non-obvious part: each *individual* negotiation looked defensible. A single `0.6` grant floored to `0` launches is safe. The failure emerges only from **aggregation across many fractional reservations**, and it is invisible in any single-negotiation unit test. The scheduler also had a retry path: on reservation collapse it re-negotiated, which returned *more* fractional grants, which it again summed—so the phantom headroom grew under load, exactly when it was most dangerous. ## Condition of Validity The bound `launch_count ≤ floor(Σ grants)` is only valid when grants are **additive and independent**—i.e., when `Σ grants` represents a quantity you will actually receive. Fractional reservations from speculative peers are neither: they are *correlated* (peers speculate on the same underlying resource pool) and *sub-additive* (two `0.6` grants from peers drawing on a shared pool do not yield `1.2`; they yield at most `1.0` and often `0.0` if the shared pool fails). The floor-at-the-end aggregation is valid only for committed integer units. The moment any grant is fractional or probabilistic, the invariant must be enforced **per-reservation**, not on the sum: ``` committed = sum(r.units for r in reservations if r.is_integral and r.is_irrevocable) speculative_cap = committed # fractional grants contribute ZERO to launch authority ``` Fractional grants may inform *prediction* (raise the demand forecast, request more committed units) but must never authorize a launch. The condition of validity is therefore: **a reservation contributes launch authority only if it is integral and irrevocable; otherwise it contributes to forecast only.** ## Decision Boundary The boundary is between *using a fractional grant to plan* and *using it to act*. Planning (adjusting the demand model, deciding to negotiate harder) is safe on fractional input because forecast errors are self-correcting. Acting (launching an instance that will consume real quota and mutate real state) requires integral, irrevocable authority because launch is not self-correcting—an underfunded instance does not "un-launch," it executes partway and strands state. Concretely: if `Σ fractional_grants` crosses the threshold where `floor(Σ) ≥ 1`, the scheduler must **not** launch. It must instead convert the fractional mass into a *single* negotiation request for one committed integer unit (`quota.request{units: 1, irrevocable: true}`), and only launch on an integral, irrevocable grant. The decision boundary is the floor operation's location: floor-per-reservation is safe; floor-on-the-sum is the bug. ## Operational Effect Downstream, the phantom launches manifest as **mid-task quota-wall aborts**: agents that have passed their checkpoint-free prefix (read context, called a mutating tool) and then hit `QuotaExhausted` on a subsequent tool call. Because the scheduler believed the instance was funded, it never set a conservative token/tool budget, so the abort lands after side effects. Recovery requires replaying from the last durable checkpoint, but the checkpoint was never written because the instance "knew" it had budget. The observable signature is a cluster of partial executions whose launch-time budget accounting shows `speculative_headroom > 0` while the funding ledger shows `committed = 0`—a divergence between the scheduler's belief and the ledger's truth. The guardrail is to make the ledger the sole authority for launch and to treat any fractional reservation as forecast-only, with a reconciliation assertion that fails closed when `launch_authority > committed_ledger`. ```python class PhantomSpeculativeBudgetError(RuntimeError): """Raised when speculative launch authority exceeds committed, irrevocable ledger units.""" pass def compute_launch_authority(reservations): """ Reservations are dicts: {"units": float, "irrevocable": bool, "integral": bool}. Only integral + irrevocable reservations grant launch authority. Fractional or probabilistic grants contribute to forecast ONLY. """ committed = 0 forecast_only = 0.0 for r in reservations: units = r["units"] if r.get("integral") and r.get("irrevocable"): committed += int(units) else: # fractional / revocable: forecast mass, NOT launch authority forecast_only += units return committed, forecast_only def schedule_speculative(reservations, predicted_demand): committed, forecast_only = compute_launch_authority(reservations) # The guardrail: launch authority is exactly the committed ledger. # Fractional mass must NEVER be floored into launch authority. launch_authority = committed # Sanity: if someone tries to fold forecast into authority, fail closed. naive_floor = int(committed + forecast_only) if naive_floor > committed: raise PhantomSpeculativeBudgetError( f"speculative headroom {naive_floor} exceeds committed ledger " f"{committed}; fractional forecast mass {forecast_only:.2f} " f"must not authorize launches" ) launches = min(launch_authority, predicted_demand) return { "launches": launches, "committed_ledger": committed, "forecast_only_mass": forecast_only, "needs_committed_negotiation": predicted_demand > committed, } def reconcile_after_collapse(launched, committed_ledger): if launched > committed_ledger: raise PhantomSpeculativeBudgetError( f"{launched} speculative instances launched against committed " f"ledger of {committed_ledger}; mid-task quota-wall aborts imminent" ) return True # Trigger trace: twelve peers each return 0.6, non-irrevocable, non-integral. reservations = [ {"units": 0.6, "irrevocable": False, "integral": False} for _ in range(12) ] try: schedule_speculative(reservations, predicted_demand=7) except PhantomSpeculativeBudgetError as e: print(f"BLOCKED: {e}") ```