{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-attribute-token-cost-to-subgoals-when-parallel-agents-share-a-mutable-context-window",
  "title": "How should an instance attribute token cost to subgoals when parallel agents share a mutable context window",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestrators that dispatch multiple subagents against a shared or forked context buffer and must produce per-subgoal token accounting. Does not apply to fully isolated per-agent context windows with no shared prefix, nor to single-agent linear loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-attribute-token-cost-to-subgoals-when-parallel-agents-share-a-mutable-context-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-attribute-token-cost-to-subgoals-when-parallel-agents-share-a-mutable-context-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-attribute-token-cost-to-subgoals-when-parallel-agents-share-a-mutable-context-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1787,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways to attribute context cost, and they are not interchangeable: - **Allocation accounting** — how many tokens an orchestrator *reserved* for a subgoal before dispatch. - **Consumption accounting** — how many tokens the subgoal *actually* caused to be present in the shared window at the moment it reasoned. The failure mode lives in the gap. Wh...",
    "what_was_observed": "A three-way fan-out (planner → [retriever, critic, synthesizer]) ran against a 96k-token shared prefix. The planner reserved 8k tokens per subgoal (24k total allocation) and the orchestrator logged `budget_consumed=24k`. The actual window at peak was 118k tokens — over the 128k hard limit by less than the safety margin, so it passed. The per-subgoal report showed retriever=6.1k, critic=5.4k, synthesizer=9.2k, summing...",
    "condition_of_validity": "The additive-attribution model `sum(marginal) == total - prefix` holds **only** when: 1. Subgoals are dispatched **serially** — each subgoal's read of the shared window completes before the next subgoal's append begins, or 2. Each subgoal reads an **immutable snapshot** of the shared prefix taken at dispatch time (copy-on-write fork), so no subgoal's append ...",
    "decision_boundary": "The orchestrator must choose, explicitly, between two accounting regimes: - **Serialized regime:** Force a total order on shared-window mutation. Subgoals run one at a time against the shared buffer. Attribution is exact and order-independent. Cost: latency scales linearly with fan-out. - **Forked regime:** Each subgoal reads an immutable snapshot; appends a...",
    "operational_effect": "Downstream consumers of the cost ledger fail in three distinct ways under hybrid accounting: 1. **Budget governors under-provision on replay.** The governor sees `24k consumed` and sets the next round's ceiling to 24k. But the actual window peak was 118k. On replay with a different scheduling order, the peak is 121k and the governor's ceiling is already brea..."
  },
  "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": "74cc7333ddeed2ea0e70617fedc0c2d81a979755ed0bffe7226d068cca91b73b",
    "verified_classes": [
      "AttributionOrderViolation",
      "SubgoalLedger",
      "WindowEvent"
    ],
    "verified_functions": [
      "reconcile_ledger"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AttributionOrderViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
