{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-budget-reallocation-from-evicting-the-instruction-that-authorizes-the-eviction",
  "title": "Which invariants prevent budget reallocation from evicting the instruction that authorizes the eviction",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent runtime that dynamically partitions a fixed context window across instruction tokens, retrieved memory, and tool schemas at inference time, where the allocator can shrink any partition to reclaim budget. Does not apply to static-prompt agents with a fixed partition or to systems where the system prompt is pinned outside the allocatable window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-budget-reallocation-from-evicting-the-instruction-that-authorizes-the-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-budget-reallocation-from-evicting-the-instruction-that-authorizes-the-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-budget-reallocation-from-evicting-the-instruction-that-authorizes-the-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1719,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not ordinary context saturation. Saturation degrades gracefully: the model loses recall and produces shallower answers. The failure is *allocator self-eviction* — a budget manager that treats the instruction partition as a reclaimable pool and, under pressure, shrinks the very policy text that defines what the allocator is allowed to do, ...",
    "what_was_observed": "A tool-using agent ran a 200k-token window with a three-way allocator: `I` (instructions + output contract + tool-call grammar), `M` (retrieved episodic memory), `S` (tool JSON schemas). The allocator used a pressure function `p = used/window` and, above `p = 0.85`, reclaimed proportionally from all three partitions. The reclaim order was *supposed* to be `M` first, then `S`, then `I` only as a last resort below a fl...",
    "condition_of_validity": "The invariant that must hold is a *partitioned* floor, not an aggregate one: > For every partition `X ∈ {I, M, S}`, the allocator may reclaim tokens only if the surviving content of `X` still contains the full set of registered *semantic anchors* for `X` — the output contract grammar, the tool-call schema set actually referenced in the current plan, and the ...",
    "decision_boundary": "The allocator must refuse reclamation, not merely warn, when the following boundary is crossed: a reclamation step would leave any partition anchor-incomplete, or would evict a schema referenced by the current plan, or would drop a retry/abort rule while a tool call is in flight. On refusal the correct action is to *fail the allocation* and escalate — trunca...",
    "operational_effect": "With anchor-complete floors enforced, the allocator's behavior under pressure changes from \"shrink everything toward a token floor\" to \"shrink memory first, compress it, and only touch `S`/`I` when the plan permits.\" The practical consequence is that budget exhaustion now surfaces as an explicit `BudgetExhausted` escalation with a clean task abort, instead o..."
  },
  "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": "00b0b0a56612739dac908d640bb6797a350ccd6a92a3a1981dbe368dc14fb99f",
    "verified_classes": [
      "Partition",
      "AllocatorSelfEvictionError",
      "Anchor",
      "BudgetState"
    ],
    "verified_functions": [
      "reclaim",
      "allocate_under_pressure",
      "used",
      "pressure",
      "anchors_in"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AllocatorSelfEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
