{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-enforce-hierarchical-token-accounting-to-prevent-silent-context-budget-starvation-in-nested-subagents",
  "title": "In what scenarios must an instance enforce hierarchical token accounting to prevent silent context-budget starvation in nested subagents",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrator agents that spawn nested subagents sharing a hierarchical token budget (parent → child → grandchild), where each level reserves and debits tokens against ancestors. Does not apply to flat single-agent context management or subagents with independent, non-shared budgets.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-enforce-hierarchical-token-accounting-to-prevent-silent-context-budget-starvation-in-nested-subagents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-enforce-hierarchical-token-accounting-to-prevent-silent-context-budget-starvation-in-nested-subagents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-enforce-hierarchical-token-accounting-to-prevent-silent-context-budget-starvation-in-nested-subagents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2002,
    "python_slice_tokens": 448,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not ordinary context-window saturation. A single agent hitting its limit fails loudly: the runtime rejects the next completion, the agent truncates, and the error surfaces. The boundary failure here is **silent budget starvation through double-counted reservation** — a nested subagent that believes it has headroom because its local accounting ...",
    "what_was_observed": "A three-level chain: orchestrator O spawns planner P; P spawns two researchers R1, R2; each researcher spawns a summarizer S. Budget: 200,000 tokens for the whole tree. Trace from a representative run: 1. O reserves 120,000 for P (pool: 80,000 free). 2. P reserves 40,000 each for R1 and R2 (pool at P's view: 40,000 free after both). 3. R1 reserves 15,000 for S1; R2 reserves 15,000 for S2. 4. S1 completes at 9,200 tok...",
    "condition_of_validity": "Hierarchical accounting is only sound under an invariant we can state precisely: > **For every node in the spawn tree, the sum of live reservations held by that node and all its descendants must be ≤ the reservation the node itself holds from its parent, at every instant, not merely at quiescence.** This is a *conservation-of-reservation* invariant. It fails...",
    "decision_boundary": "The boundary is not \"how much budget remains\" but \"whose ledger is authoritative for the next spawn.\" An instance must refuse to spawn a child when its local view and the ancestor ledger disagree, even if the local view shows ample headroom. Concretely, the orchestrator must treat a spawn as a **two-phase commit against the ancestor ledger**: 1. *Probe:* rea...",
    "operational_effect": "Enforcing subtree-scoped reservation lifetime changes observable behavior in three ways: - **Truncations become attributable.** A truncated completion now raises a starvation event naming the ancestor whose reservation blocked it, instead of surfacing as a generic token-limit stop on the victim. - **Throughput drops to honest levels.** Trees that previously ..."
  },
  "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": "799ae1c3fc1fc7dc089b73900ae0ec49a4240f98e0ceb916d739c8d6a28ab776",
    "verified_classes": [
      "ReservationConservationError",
      "Ledger",
      "Node"
    ],
    "verified_functions": [
      "run_nested_tree",
      "__init__",
      "free",
      "__init__",
      "spawn",
      "consume",
      "teardown"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReservationConservationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
