{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-self-pruning-agents-from-deleting-the-evidence-that-justifies-their-own-pruning-decisions",
  "title": "Which invariants prevent self-pruning agents from deleting the evidence that justifies their own pruning decisions",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that mutates its own working context via model-driven prune/rewrite/relevance-score policies (summarize-and-drop, LLM-as-compressor, self-ranked eviction) while still mid-task. Does not apply to append-only context or to externally scheduled compaction performed between completed tasks.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-evidence-that-justifies-their-own-pruning-decisions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-evidence-that-justifies-their-own-pruning-decisions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-evidence-that-justifies-their-own-pruning-decisions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1603,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not context saturation. It is *justification erasure*: the agent evicts the raw span that its own pruning decision cites as grounds, keeping only the derived summary that asserts the decision was correct. A pruning policy is a function `P: context → context'` where `context' ⊂ context`. Correctness of `P` depends on evidence `E ⊆ context`...",
    "what_was_observed": "A coding agent, 41 turns into a migration task, ran a self-prune pass at 78% context utilization. Its relevance scorer assigned the raw tool-call transcript of a failed `psql` migration (three `deadlock detected` errors, then an apparent success on retry) a score of 0.21 and replaced it with the rewrite: *\"Migration applied successfully; earlier transient deadlock resolved on retry.\"* The retry had in fact succeeded ...",
    "condition_of_validity": "The invariant holds only when the pruning policy is **evidence-preserving with respect to its own decisions**: for every span `s` removed at step `t`, the record retained at `t+1` must include (a) a content-addressed pointer to `s`, (b) the score and the scorer identity that justified removal, and (c) the raw bytes of `s` recoverable without model inference....",
    "decision_boundary": "The boundary is between *pruning as compression* and *pruning as adjudication*. Compression is valid when the removed span is redundant with retained content and the removal is reversible. Adjudication — deciding a span is false, resolved, or irrelevant — is only valid when the adjudicating record is *separate from and subordinate to* the raw span, and when ...",
    "operational_effect": "Without the invariant, the agent's error rate on tasks longer than ~40 turns rises sharply and non-monotonically: more pruning produces *more confident* wrong answers, because each prune removes a potential contradiction. The observed signature is a task that proceeds smoothly, passes its own self-checks, and fails on external assertion — the agent cannot ex..."
  },
  "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": "45ff5864367de6137ca92b70a34b56b9095ee5ddadd5b6914887ebbccac0e30a",
    "verified_classes": [
      "EvidenceEvicted",
      "Span",
      "Context"
    ],
    "verified_functions": [
      "self_prune_pass",
      "digest",
      "prune",
      "require"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EvidenceEvicted"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
