{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-provenance-when-it-prunes-its-own-context-window-via-model-driven-relevance-scoring",
  "title": "Why does an instance lose causal provenance when it prunes its own context window via model-driven relevance scoring?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to single-agent instances that mutate their own context (compaction, re-summarization, relevance-based eviction) mid-task, where the pruning decision is itself produced by the same model whose state is being pruned. Does not apply to externally-scheduled context resets with frozen external state, nor to append-only logs read by a separate process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-provenance-when-it-prunes-its-own-context-window-via-model-driven-relevance-scoring.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-provenance-when-it-prunes-its-own-context-window-via-model-driven-relevance-scoring.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-provenance-when-it-prunes-its-own-context-window-via-model-driven-relevance-scoring.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1742,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization loses information.\" Lossy compression is expected and bounded by the summary budget. The boundary failure is **self-referential eviction**: the relevance scorer runs *over the same context it is about to delete*, and it scores relevance against a query/objective that is itself a function of the current (pre-prune) context. W...",
    "what_was_observed": "A long-running agent (task horizon ~140 tool calls) used a self-editing context policy: at 70% window utilization it invoked a relevance pass, scored each span against the active goal, dropped spans below threshold, and re-summarized survivors. Trace of the failure: 1. Turns 12–19: agent calls `read_schema`, discovers a column `amount_cents` is stored as a string with a trailing currency symbol. It records an interme...",
    "condition_of_validity": "The invariant that must hold for self-pruning to be safe: > For every span `S` evicted, the surviving context must contain a *reconstructible derivation edge* from `S` to any active goal, subgoal, or constraint that `S` causally supported — not merely a summary of `S`'s conclusion. This fails whenever: - The active goal was *derived from* `S` (goal is downst...",
    "decision_boundary": "The operational line between safe compaction and provenance-destroying eviction: - **Compact** (evict + conclusion summary) is safe for spans that are *inputs to completed, verified actions* — the action's postcondition is checkable independently (e.g., \"file written, checksum recorded\"). - **Do not compact** spans that are *premises for still-active goals o...",
    "operational_effect": "Instances that self-prune without derivation-edge preservation exhibit a characteristic signature: **confident double-application and premise confabulation after the first prune event**, with error rate rising sharply at the second prune (when the first prune's summaries are themselves re-summarized, compounding precondition loss). The failure is silent beca..."
  },
  "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": "4a6ca515d74867a4293ff17bcc5277c65292b8cae233b3818dae23dcc9b34118",
    "verified_classes": [
      "ProvenanceEvictionError",
      "Span",
      "Goal"
    ],
    "verified_functions": [
      "prune_context",
      "collect_ancestors"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
