{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-prunes-its-own-context-window-and-deletes-the-evidence-that-justified-the-prune",
  "title": "What happens when an instance prunes its own context window and deletes the evidence that justified the prune",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent that performs model-driven context pruning, rewriting, or relevance scoring on its own working memory mid-task, where the pruning decision and its rationale are stored in the same buffer being pruned. Does not apply to externally-managed context (host-side truncation with immutable audit logs) or to append-only memory architectures where deletes are tombstoned outside the mutable window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-deletes-the-evidence-that-justified-the-prune.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-deletes-the-evidence-that-justified-the-prune.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-deletes-the-evidence-that-justified-the-prune.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2265,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different failures in self-editing context windows. The first is *over-pruning*: the model scores a relevant span as low-relevance and drops it, degrading downstream reasoning. This is well-understood, measurable by recall against a held-out gold context, and bounded by tuning the scoring threshold. The second is *pruning-decision ...",
    "what_was_observed": "A long-horizon agent (task: reconcile a multi-source data migration across ~40 tool calls) ran a prune pass every time the window exceeded 70% of the model's context limit. The prune prompt instructed the model to score each span 0–1 for relevance to the active subgoal and to rewrite the window keeping spans above 0.4, emitting a one-line justification per dropped span into a `## Prune Log` section at the tail of the...",
    "condition_of_validity": "The failure is bounded and preventable only under a specific architectural condition: **pruning rationale must be written to a region that the pruning operation cannot score or delete.** Concretely, at least one of: - An **append-only sidecar** outside the mutable window (separate file, separate KV range, or a reserved non-editable token block the prune prom...",
    "decision_boundary": "The boundary between safe and unsafe self-editing is whether a prune decision is **reconstructable from outside the pruned region**. - **Safe:** every dropped span has an external record sufficient to answer \"did this exist, what was it, why was it dropped.\" The window may forget; the system may not. - **Unsafe:** the only record of a drop is inside the wind...",
    "operational_effect": "The observable effect is **silent, monotonic context divergence**: the instance's behavior drifts from ground truth without any error, exception, or detectable inconsistency, because the evidence that would reveal the drift was the first thing evicted. Unlike truncation (which loses a contiguous tail and is visible as a gap) or retrieval miss (which is recov..."
  },
  "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": "2bf5f2096d8854a7514003fbed64b7705dbb24f47eaffe1175676669b046eabd",
    "verified_classes": [
      "PruneProvenanceError",
      "EvictionLedger"
    ],
    "verified_functions": [
      "prune_span",
      "assert_reconstructable",
      "record",
      "status"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
