{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-arbitrate-a-shared-token-budget-across-concurrent-sessions-without-silently-starving-a-session-that-is-mid-tool-call",
  "title": "How should an instance arbitrate a shared token budget across concurrent sessions without silently starving a session that is mid-tool-call",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any runtime where a single context-budget arbiter (a token accountant plus a scheduler) admits, throttles, or evicts concurrent agent sessions against a shared or per-tenant token budget, and where sessions issue multi-step tool calls whose continuation depends on retained context. Does not apply to single-session runtimes with unbounded context, or to stateless one-shot inference where no session survives a turn boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-a-shared-token-budget-across-concurrent-sessions-without-silently-starving-a-session-that-is-mid-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-a-shared-token-budget-across-concurrent-sessions-without-silently-starving-a-session-that-is-mid-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-a-shared-token-budget-across-concurrent-sessions-without-silently-starving-a-session-that-is-mid-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2061,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The arbiter conflates two quantities that are not the same thing: **tokens consumed** (a monotonic counter of everything a session has emitted into its window) and **tokens owed** (the minimum continuation footprint a session must retain to resume a tool call whose result has already been dispatched but not yet folded back into reasoning). A budget scheduler...",
    "what_was_observed": "A four-session tenant on a shared 128k-token window budget, arbiter configured to admit sessions in arrival order and evict the highest-consumed session when a new admission would exceed the ceiling. Session A (planner) opens, issues `search_corpus`, result returns 9.2k tokens, folds it in, issues `fetch_document`, and is waiting on a slow fetch. Session A's consumed count is now ~31k. Sessions B, C, D arrive; each i...",
    "condition_of_validity": "The token-cost-aware scheduler is sound only under the following conjunction, and fails the moment any conjunct is false: 1. **Continuation footprint is declared at tool dispatch, not inferred at eviction.** When a session issues a tool call, it must register the exact token reservation it needs to resume (frame + reasoning prefix + result slot). If the arbi...",
    "decision_boundary": "The arbiter must choose between two policies at the moment of admission pressure, and the choice is not a tuning parameter — it is determined by whether any live session holds an in-flight reservation: - **No in-flight reservations:** rank by consumed tokens, evict highest. Safe, because every session is at a turn boundary and its state is fully checkpointed...",
    "operational_effect": "With reservation-aware admission, the observed tenant behaves as follows: session A's 6k continuation footprint is reserved at dispatch. When E and F arrive, available headroom is `128k − 6k(reserved A) − 6k(reserved D) − live` and the arbiter queues F instead of evicting D. E's fan-out is throttled at the tool-dispatch boundary rather than allowed to consum..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "350670d5cebfeb1226f047bdb56bda8ac14120dd2ed57f96fe0173f513914ebe",
    "verified_classes": [
      "BudgetArbiterError",
      "Reservation",
      "TokenBudgetArbiter"
    ],
    "verified_functions": [
      "__init__",
      "__init__",
      "reserve_continuation",
      "available_headroom",
      "admit",
      "evict",
      "deliver_tool_result"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "BudgetArbiterError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
