{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-a-self-editing-context-policy-fail-to-reclaim-tokens-when-pruning-stale-reasoning-traces-under-a-hard-budget",
  "title": "Why does an instance of a self-editing context policy fail to reclaim tokens when pruning stale reasoning traces under a hard budget",
  "date_of_record": "2026 November 13",
  "scope": "Applies to agent runtimes where the model itself selects which prior reasoning traces (chain-of-thought, scratchpads, tool-call rationales) to evict in order to fit a token budget, and where eviction decisions are made by the same model that produced the traces. Does not apply to policies where pruning is driven by an external, trace-independent heuristic (e.g., recency, fixed TTL, or a separately-trained classifier) or where the budget is soft and overflow is tolerated.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-self-editing-context-policy-fail-to-reclaim-tokens-when-pruning-stale-reasoning-traces-under-a-hard-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-self-editing-context-policy-fail-to-reclaim-tokens-when-pruning-stale-reasoning-traces-under-a-hard-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-a-self-editing-context-policy-fail-to-reclaim-tokens-when-pruning-stale-reasoning-traces-under-a-hard-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1678,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A pruning decision has two separable costs: the *decision cost* (the tokens the model must read and emit to decide what to prune) and the *reclamation* (the tokens freed by the eviction). Most analyses assume the decision is cheap relative to reclamation, so any eviction that removes a stale trace is net-positive. The boundary failure is that the decision it...",
    "what_was_observed": "In a runtime with a 32k-token window and a hard budget of 24k, the model was invoked with a meta-instruction to identify and drop stale reasoning traces whenever utilization exceeded 22k. Under sustained tool-loop workloads the following pattern reproduced across runs: - Utilization climbed to 22k, triggering a prune pass. - The prune pass read a summary of candidate traces (~600 tokens of index), emitted a rationale...",
    "condition_of_validity": "The failure holds when all of the following are true: 1. **Decision-in-band**: the prune decision is generated while utilization is within the decision-overhead of the budget ceiling. Formally, if `overhead` is the token cost of index + rationale and `headroom = budget - utilization`, the failure is active when `headroom < overhead + ε`. 2. **Self-eligibilit...",
    "decision_boundary": "The operational rule is a comparison at trigger time, not a judgment about trace staleness: Where `overhead_margin` is a configured floor (observed safe value: ≥ 1.5× expected rationale size). The boundary is not \"is this trace stale?\" but \"does evicting it, *including the cost of deciding to evict it*, move utilization below the trigger threshold by more th...",
    "operational_effect": "Deploying the boundary check eliminated the oscillation: prune passes dropped from 11 to 4 per 40-turn run, net reclamation became positive on every pass, and peak utilization stabilized at ~21.4k with genuine headroom. The failure mode had been invisible in aggregate metrics because *trace count decreased* (the policy looked effective) while *budget headroo..."
  },
  "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": "a259912ce2034aa1ac366243fe57291b4ea7a12595151935f03dc16e8645ace2",
    "verified_classes": [
      "PruneBudgetError"
    ],
    "verified_functions": [
      "evaluate_prune_pass",
      "run_prune_pass"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneBudgetError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
