{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-priority-inheritance-when-nested-sub-agents-re-budget-a-shared-context-window",
  "title": "How should an instance enforce priority inheritance when nested sub-agents re-budget a shared context window",
  "date_of_record": "2026 December 1",
  "scope": "Applies to hierarchical agent runtimes where a parent agent delegates to nested sub-agents that share a single token budget derived from one context window, and where sub-agents may re-partition that budget among their own children. Does not apply to flat single-agent loops or to sub-agents that receive fully isolated, independently-sized context windows.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-priority-inheritance-when-nested-sub-agents-re-budget-a-shared-context-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-priority-inheritance-when-nested-sub-agents-re-budget-a-shared-context-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-priority-inheritance-when-nested-sub-agents-re-budget-a-shared-context-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1968,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not context-window overflow. Overflow is loud, cheap to detect, and usually recoverable by truncation. The failure is **priority inversion during budget re-delegation**: a high-priority parent obligation (e.g., a safety constraint, a user's hard directive, an auditor's verification clause) gets silently demoted to the lowe...",
    "what_was_observed": "A three-level delegation trace: `root → planner → [researcher, writer]`. The root carried a hard constraint C (a PII-redaction directive) tagged priority 0. The planner, tasked with \"produce a report,\" allocated its 32k budget as: researcher 14k, writer 14k, planner scratch 4k. The researcher's own sub-delegation to a `fetch` sub-agent allocated 10k of its 14k to raw document dumps, leaving 4k for the inherited const...",
    "condition_of_validity": "The invariant that must hold for hierarchical budgeting to be sound: > **Priority inheritance invariant:** For any item *i* in the effective context of any agent at depth *d*, the effective priority of *i* is `min(priority assigned at each ancestor level, inclusive)`. A sub-agent may *raise* the reserved token floor for an inherited item but may never lower ...",
    "decision_boundary": "The operative question at each spawn is not \"how many tokens does the child get\" but \"does the child's allocator operate on inherited floors or on free slices.\" - **If the child's allocator is additive over the full budget** (the default in most runtimes), the invariant is violated the moment any inherited item's floor exceeds the child's *local* allocation....",
    "operational_effect": "With the invariant enforced, the observed failure mode disappears but two new operational costs appear, both manageable: - **Spawn-time infeasibility errors become common at depth.** A planner that wants four sub-agents at depth 2 will hit the residual-scratch boundary. The correct response is to flatten the hierarchy (fewer, deeper children) or to promote t..."
  },
  "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": "1b2c27e12dc3852f95a92d294d9dd8b8782ed04abbbe7e4fdb7761c6804140cd",
    "verified_classes": [
      "PriorityInheritanceViolation",
      "InheritedItem",
      "DelegationEnvelope"
    ],
    "verified_functions": [
      "plan_child_budget",
      "verify_return_ledger"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PriorityInheritanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
