{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-context-budget-starvation-when-priority-reallocation-races-concurrent-sub-agents",
  "title": "Which invariants prevent context-budget starvation when priority reallocation races concurrent sub-agents",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrator-mediated sub-agent fan-out where a shared token budget is arbitrated per-turn by a priority scheduler that can revoke or shrink a running sub-agent's context allocation. Does not apply to independent per-agent budgets with no shared pool, nor to single-agent context-window management.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-context-budget-starvation-when-priority-reallocation-races-concurrent-sub-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-context-budget-starvation-when-priority-reallocation-races-concurrent-sub-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-context-budget-starvation-when-priority-reallocation-races-concurrent-sub-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1571,
    "python_slice_tokens": 162,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A context budget is not a resource like CPU time that can be preempted and resumed with no semantic cost. When a priority scheduler reallocates tokens away from a running sub-agent, it does not pause that agent—it *truncates the agent's working state mid-reasoning*. The distinction that matters operationally is between **allocating** tokens (a scheduling dec...",
    "what_was_observed": "An orchestrator fanned out six sub-agents over a shared 200k-token pool with a priority scheduler. Priorities were dynamic: a sub-agent that reported a \"blocking\" status was promoted; others were demoted and their allocations shrunk to fund the promotion. The scheduler ran between token-generation checkpoints, not between turns. Trace of the failure: 1. Sub-agent `S3` (research branch) held 48k tokens: 12k of retriev...",
    "condition_of_validity": "The guardrail holds only under these jointly-required conditions, and fails silently if any is dropped: - **Turn-granular arbitration.** Reallocation decisions are evaluated at turn boundaries only. A \"turn\" is the span from prompt assembly to the agent's yield of control. Mid-turn reclamation is forbidden regardless of priority delta. - **Referential integr...",
    "decision_boundary": "The boundary is between **deferral** and **eviction** as the response to budget pressure. The decision rule: - If a higher-priority agent needs tokens and the pool is exhausted, the correct action is to **defer** the lower-priority agent's *next turn* (queue it, keep its context frozen and intact). Cost: latency. State: preserved. - **Evict** only when the e...",
    "operational_effect": "With turn-granular arbitration and referential-integrity eviction enforced, the observed failure class disappears and is replaced by a bounded, visible latency cost: under contention, low-priority sub-agents queue, and the orchestrator's wall-clock time increases proportionally to the contention depth. This is the correct trade. The alternative—priority pree..."
  },
  "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": "481880b55fe31d8a090c93c6ca35c3328982d3807b5d2bd4530622d963599ab8",
    "verified_classes": [
      "ContextReallocationViolation"
    ],
    "verified_functions": [
      "reallocate_budget"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ContextReallocationViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
