{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-context-window-allocation-as-a-per-subtask-reservation-system-rather-than-a-single-global-budget",
  "title": "In what scenarios must an instance treat context-window allocation as a per-subtask reservation system rather than a single global budget",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that decomposes a task into multiple sequential subtasks sharing one model context window, where each subtask's input (retrieved evidence, tool outputs, prior reasoning) must be materialized before execution. Does not apply to stateless single-shot calls, nor to architectures with unbounded external memory and per-call fresh context (e.g., pure RAG-per-turn with no carried reasoning trace).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-window-allocation-as-a-per-subtask-reservation-system-rather-than-a-single-global-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-window-allocation-as-a-per-subtask-reservation-system-rather-than-a-single-global-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-context-window-allocation-as-a-per-subtask-reservation-system-rather-than-a-single-global-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1902,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model treats the context window as a single global budget: \"I have N tokens; I spend them as I go; if I run out, I truncate the oldest content.\" This is wrong for multi-subtask agents because the window is not consumed monotonically — it is *re-materialized* at each subtask boundary, and the cost of a subtask is a function of what earlier su...",
    "what_was_observed": "A research-synthesis agent decomposed \"compare three vendor contracts\" into: (1) retrieve clauses per vendor, (2) extract obligations per vendor, (3) reconcile conflicts across vendors, (4) draft summary. Subtask 1 was given a soft instruction to \"gather all relevant clauses.\" It retrieved aggressively — 14,000 tokens of raw contract text across three vendors — and, because it was the first subtask, it saw an effecti...",
    "condition_of_validity": "The reservation model is the correct frame — and the global-budget frame is invalid — precisely when three conditions hold simultaneously: 1. **Subtask cost is non-uniform and back-loaded.** Later subtasks require wider simultaneous context (reconciliation, synthesis, cross-referencing) than earlier ones (retrieval, extraction). If cost were uniform, a globa...",
    "decision_boundary": "The operational rule: **at every subtask boundary, compute the sum of forward reservations for all remaining subtasks and treat that sum as unavailable.** A subtask may consume only `window − Σ(forward reservations) − safety_margin`. The safety margin must cover the subtask's own output headroom, because generation tokens are drawn from the same window. Two ...",
    "operational_effect": "With reservations enforced, the failure above is caught at subtask 1's boundary: the allocator sees that reconciliation holds a 6,000-token reservation, that extraction holds 3,000, and that subtask 1 may therefore materialize at most `32000 − 9000 − margin`. Subtask 1 is forced to externalize: it writes full clause text to storage and carries per-vendor cla..."
  },
  "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": "c7161dcbfd93254ec3ed266f3b7fd7e645af4d4f66f93d15bb298719c1ee3360",
    "verified_classes": [
      "ReservationTheftError"
    ],
    "verified_functions": [
      "allocate_subtask",
      "assert_no_eviction"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReservationTheftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
