{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-starvation-deadlock-in-shared-context-budget-arbiters-when-a-single-agent-s-reservation-request-exceeds-the-reclaimable-windo",
  "title": "Which invariants prevent starvation deadlock in shared-context budget arbiters when a single agent's reservation request exceeds the reclaimable window",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent systems where N agents write into a single shared context window (or a shared token pool backing it) governed by a budget arbiter that grants per-agent reservations before generation. Does not apply to per-agent private context windows with post-hoc truncation, nor to stateless single-turn pipelines.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-starvation-deadlock-in-shared-context-budget-arbiters-when-a-single-agent-s-reservation-request-exceeds-the-reclaimable-windo.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-starvation-deadlock-in-shared-context-budget-arbiters-when-a-single-agent-s-reservation-request-exceeds-the-reclaimable-windo.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-starvation-deadlock-in-shared-context-budget-arbiters-when-a-single-agent-s-reservation-request-exceeds-the-reclaimable-windo.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2552,
    "python_slice_tokens": 523,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a shared-context budget arbiter can fail under contention, and only one of them is a fairness bug. The first is **ordinary starvation**: a low-priority writer never gets a reservation because higher-priority writers keep re-reserving freed tokens. This is a scheduling problem, and priority-aging or weighted fair queuing fixes it. Everyone ...",
    "what_was_observed": "A four-agent pipeline (planner, retriever, synthesizer, auditor) shared a 200k-token context window. The arbiter tracked three quantities per token region: `free`, `reclaimable` (held by agents whose content is evictable — completed turns, superseded drafts), and `pinned` (held by agents in an active tool call, mid-checkpoint, or holding a verification transcript). Fairness was implemented as weighted deficit round-r...",
    "condition_of_validity": "The invariant holds — and the deadlock is prevented — only when the arbiter's admission predicate is: with `pinned` excluded entirely from the admission sum, and with `reclaimable` computed as the set of regions whose holders have affirmatively released eviction rights (not \"regions the arbiter guesses it can compress\"). Two conditions make this valid rather...",
    "decision_boundary": "The boundary between \"defer\" and \"fail\" is the requesting agent's own tolerance, and the arbiter must not decide it unilaterally. Three regimes: - **`request <= free + reclaimable`**: admit immediately. - **`free + reclaimable < request <= free + reclaimable + pinned_compressible_best_effort`**: defer with re-evaluation. Do *not* admit against the best-effor...",
    "operational_effect": "With the floor-keyed admission predicate and parked-request re-evaluation, the observed pipeline behaves as follows under the same interleaving. The synthesizer's 90k request is parked (floor = 52k), reported to the synthesizer with `reclaimable_floor=52000`. The synthesizer, seeing it cannot fit, either chunks its synthesis into two 45k passes (each admitte..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "a17265d6fc754610dda9a881a234634ba2ad30270c5e2cf116f6d1643522ff05",
    "verified_classes": [
      "ReservationDeadlockError",
      "RegionState",
      "Region",
      "Reservation",
      "BudgetArbiter"
    ],
    "verified_functions": [
      "run_admission",
      "_floor",
      "_pinned",
      "request",
      "on_release",
      "assert_no_unsatisfiable_open_reservation"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReservationDeadlockError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
