{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-pruning-context-window-has-crossed-from-summarization-into-self-referential-erasure",
  "title": "What structural signals indicate a self-pruning context window has crossed from summarization into self-referential erasure",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that own a mutable context buffer and emit their own prune/rewrite directives (drop-span, compress-to-summary, replace-with-pointer) against that buffer mid-task. Does not apply to externally-managed context (host-side truncation, sliding-window middleware the model cannot author) or to append-only scratchpads where the model has no delete/rewrite authority.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-context-window-has-crossed-from-summarization-into-self-referential-erasure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-context-window-has-crossed-from-summarization-into-self-referential-erasure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-context-window-has-crossed-from-summarization-into-self-referential-erasure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2465,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot something.\" The failure is that the model *deleted the evidence it would need to know it had deleted something*. A self-editing context window has two distinct regimes that look identical in the token stream but are structurally different: - **Summarization**: a span of raw history is replaced by a shorter artifact that *...",
    "what_was_observed": "A long-horizon task agent (tool-calling loop, ~90k effective window, model-authored pruning enabled with a \"keep the buffer under 40k tokens\" instruction) was run on a multi-file refactor task. The pruning policy the model authored was reasonable-looking: *\"When the buffer exceeds budget, replace the oldest N tool-result spans with a one-line summary; if a summary itself is old, fold it into the running task summary....",
    "condition_of_validity": "The provenance-closure invariant holds — and the window is safe to self-edit — only when all of the following are true simultaneously: - **Type separation.** The policy's rewrite targets are typed: `Observation`, `Summary(of: span-ids)`, `Fold(of: summary-ids)`. A directive to fold a `Fold` is legal; a directive to rewrite a `Fold` such that it drops the `of...",
    "decision_boundary": "The operational decision is: **at what point does the agent stop trusting its own buffer and force a re-read from source?** The boundary is crossed when the provenance-chain count in the buffer falls below the number of *open questions* the task still depends on — not when the token budget is hit. Concretely, gate the prune directive on a pre-flight predicat...",
    "operational_effect": "The effect of enforcing provenance closure is a bounded, slightly larger buffer with a *representable* ignorance: the agent can say \"I pruned span-7 which concerned auth-expiry; I must re-read before answering.\" That negative space is the entire value — it converts an invisible amnesia into a visible, actionable gap. The cost is that self-editing becomes les..."
  },
  "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": "366cb88f2b306414becec62b218e6a3d4c782e75117ac26f685377a52f86aa06",
    "verified_classes": [
      "ProvenanceClosureViolation",
      "Artifact",
      "ContextBuffer"
    ],
    "verified_functions": [
      "self_prune",
      "surviving_leaf_refs",
      "apply_rewrite"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceClosureViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
