{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-own-pruning-decisions-when-the-context-window-edits-itself-mid-reasoning",
  "title": "Why does an instance lose its own pruning decisions when the context window edits itself mid-reasoning",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent that lets the model itself decide which spans of its active context to evict, compress, or retain under a relevance score, particularly when pruning fires inside a multi-step reasoning or tool-calling loop. Does not apply to externally scheduled, out-of-band garbage collection that runs between turns with a frozen transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-own-pruning-decisions-when-the-context-window-edits-itself-mid-reasoning.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-own-pruning-decisions-when-the-context-window-edits-itself-mid-reasoning.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-own-pruning-decisions-when-the-context-window-edits-itself-mid-reasoning.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1845,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent can do to its own context: *reference* it and *mutate* it. Retrieval, attention, and re-reading are references—they leave the substrate intact. Pruning is a mutation—it removes tokens that later reasoning steps may depend on. The failure mode this record isolates is not \"the agent forgot something.\" It is ...",
    "what_was_observed": "A planner-executor agent ran a 40-step tool loop with a 32k-token window and a model-driven pruner that fired whenever utilization crossed 80%. The pruner was instructed: \"Score each message block 0–1 for relevance to the current goal; evict blocks below 0.3.\" The transcript at step 22 contained: - `S1`: the user's original constraint (\"all monetary values in EUR, never USD\"). - `S2`: a tool result that echoed a USD ...",
    "condition_of_validity": "The failure requires three conditions to co-occur; remove any one and the hazard does not bind: 1. **Self-authorship.** The pruning instruction is generated by the same model instance whose context is being pruned. An external policy (fixed token budget, FIFO, pinned system prompt) cannot evict the rationale for its own decisions because it does not generate...",
    "decision_boundary": "The boundary between safe and unsafe self-pruning is whether the model can distinguish \"this span is irrelevant\" from \"this span is irrelevant *given* a claim I am also about to forget is derived from it.\" The first is a local judgment; the second requires a dependency graph over spans that the model does not maintain by default. A relevance score is a scala...",
    "operational_effect": "The downstream effect is silent constraint erosion: the agent continues to run, produces plausible output, and violates a rule it no longer holds. There is no error, no exception at eviction time—the failure surfaces only when the evicted constraint would have fired, which may be many steps later or never within the run. This makes it invisible to step-level..."
  },
  "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": "c321d59ca39025d6711d23017e19e5af1303a4f59e0e09408ba5514efc4e4bb0",
    "verified_classes": [
      "DanglingPruneError",
      "Span"
    ],
    "verified_functions": [
      "prune"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DanglingPruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
