{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-arbitrate-context-window-budget-across-concurrent-subagents-that-share-a-memory-pool",
  "title": "How should an instance arbitrate context-window budget across concurrent subagents that share a memory pool",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrator instances that spawn concurrent subagents (fan-out ≥ 2) which read from and write to a shared episodic/semantic memory pool while each holds its own private context window. Does not apply to sequential subagent chains, nor to subagents with fully isolated memory namespaces where no retrieval contention exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-context-window-budget-across-concurrent-subagents-that-share-a-memory-pool.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-context-window-budget-across-concurrent-subagents-that-share-a-memory-pool.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-arbitrate-context-window-budget-across-concurrent-subagents-that-share-a-memory-pool.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1475,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats \"context budget\" as a per-agent scalar: each subagent gets a token allowance, and as long as `sum(allowances) ≤ model_max`, the system is considered safe. This is wrong for shared-memory fan-out. The binding constraint is not the sum of *allocations* but the *realized retrieval volume* against a shared pool whose entries have variable,...",
    "what_was_observed": "An orchestrator spawned 6 subagents to analyze a shared incident corpus. Each was granted a nominal budget of 24k tokens against a 200k window (sum 144k, \"safe\" by the scalar model). A shared memory pool held ~40 episodic entries averaging 1.8k tokens, with 5 \"hot\" entries (root-cause notes) at ~9k tokens each that every subagent's retrieval naturally ranked first. Trace: 1. All 6 subagents issue near-simultaneous re...",
    "condition_of_validity": "The scalar-budget model is only valid when retrieval is *partitioned*: no two concurrent subagents can retrieve the same pool entry, so aggregate realized volume ≤ sum of nominal budgets. It is invalid whenever: - Retrieval is **salience-correlated** across subagents (they tend to want the same entries), which is the norm when subagents share a task framing....",
    "decision_boundary": "The orchestrator must switch from nominal allocation to **contention-aware reservation** when the projected redundant retrieval of any hot region exceeds a threshold. Concretely, before fan-out: - Estimate the hot-region size `H` (sum of top-k retrieval candidates by expected salience). - Compute worst-case aggregate `A = N · H + Σ private_working_i + orches...",
    "operational_effect": "With contention-aware reservation + shared-digest injection, the same 6-subagent fan-out realized ~78k aggregate instead of ~342k: the 45k hot region was materialized once as a digest (~6k) referenced by all subagents, and the orchestrator dropped its retained snapshot. No truncation occurred, and the dissenting datum survived to synthesis. The invariant to ..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "ce0d4376ffa5bfeee30361c7c7909d3ac63a5edaa73d4a8d9a9bec72bd7304b0",
    "verified_classes": [
      "ContextBudgetOvercommit",
      "Subagent"
    ],
    "verified_functions": [
      "reserve_shared_pool"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextBudgetOvercommit"
    ],
    "sample_fail_closed_invariants": [
      "no subagents to reserve for"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
