{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-shared-substrate-context-budget-arbitration-from-silently-starving-a-sub-agent-mid-tool-call",
  "title": "Which invariants prevent shared-substrate context budget arbitration from silently starving a sub-agent mid-tool-call",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that spawn concurrent sub-agents drawing from a shared, mutable context/memory substrate (single KV/vector store, shared scratchpad, or shared token pool) with per-agent budget leases. Does not apply to fully isolated per-agent contexts with no shared read/write budget, nor to single-agent sequential execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-shared-substrate-context-budget-arbitration-from-silently-starving-a-sub-agent-mid-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-shared-substrate-context-budget-arbitration-from-silently-starving-a-sub-agent-mid-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-shared-substrate-context-budget-arbitration-from-silently-starving-a-sub-agent-mid-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1566,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"one agent ran out of tokens.\" It is **asymmetric preemption during an in-flight tool call**: a sub-agent's budget is revoked *between* emitting a tool-call request and receiving its result, because a concurrent peer's allocation grew and the arbiter rebalanced. The distinguishing property is that budget exhaustion in a *cooperative* subst...",
    "what_was_observed": "A four-way fan-out over a shared 128k-token substrate with a greedy arbiter (largest-remaining-demand-first). Each sub-agent leased 24k tokens. Agent B issued a `fetch_records` tool call whose expected payload was ~9k tokens; it reserved 9k at call-emit time. While the call was in flight (~2.1s, external HTTP), Agent D's planner emitted a burst of three parallel sub-tasks and requested +18k. The arbiter, seeing B's r...",
    "condition_of_validity": "The invariant \"a held reservation is exclusive until released\" holds **only if** the arbiter treats a reservation as a *lease with a liveness clock*, not as a *soft hint*. The failure requires all of: 1. A shared writable substrate with logical (not physical) partitioning — regions are address ranges the arbiter hands out, not hardware-isolated. 2. An arbite...",
    "decision_boundary": "The boundary is **idle-reclaim vs. in-flight-hold**. An arbiter must classify every reservation into exactly one of: - **Held-active**: the owning agent is consuming tokens (streaming, generating). Reclaimable only by explicit preemption with signaling. - **Held-in-flight**: the owning agent has an outstanding tool call and is blocked on external I/O. *Not r...",
    "operational_effect": "With the call-token invariant enforced, the observed corruption is eliminated: B's reservation stays pinned through the 2.1s call, D's +18k request is queued or partially satisfied from genuinely idle regions, and B's 9.1k write lands in a region it exclusively owns. The cost is throughput — D waits — which is the correct trade: a bounded latency penalty ver..."
  },
  "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": "480a8ea1388a61eb0bdbf3e3577852e8e683a8db9a6e8255faf75b9c3095ed0a",
    "verified_classes": [
      "SharedSubstrateLeaseError",
      "Reservation",
      "Arbiter"
    ],
    "verified_functions": [
      "__init__",
      "region",
      "__init__",
      "emit_tool_call",
      "tool_result",
      "reclaim",
      "write_result"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SharedSubstrateLeaseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
