{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-self-pruning-agents-from-deleting-the-provenance-edge-that-justifies-a-retained-fact",
  "title": "Which invariants prevent self-pruning agents from deleting the provenance edge that justifies a retained fact",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that mutate their own context window mid-task via model-driven pruning, rewriting, or salience-scored retention. Does not apply to append-only context managers or to external retrieval stores whose contents are immutable during a task.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-provenance-edge-that-justifies-a-retained-fact.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-provenance-edge-that-justifies-a-retained-fact.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-self-pruning-agents-from-deleting-the-provenance-edge-that-justifies-a-retained-fact.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1950,
    "python_slice_tokens": 400,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context window conflates two operations that have different correctness semantics: **compression** (reducing token count while preserving derivable content) and **eviction** (removing content whose loss is unrecoverable within the task). Model-driven pruning routinely performs eviction while reporting it as compression. The failure is not that...",
    "what_was_observed": "An agent executing a 40-step data-reconciliation task across three tool backends (a SQL source, a CSV export, and a REST endpoint) maintained its own scratch context. At step 22, the context reached 87% of the window budget. The agent ran a self-pruning pass with a salience prompt: *\"Retain the facts needed to complete the task; discard redundant tool output.\"* The pruning pass scored each span by embedding similarit...",
    "condition_of_validity": "The failure requires three conditions to co-occur: 1. **Salience scoring is similarity-based and content-blind to contradiction.** The pruner ranks spans by relevance to the query, not by their role as counter-evidence. A contradiction span is, by construction, *less* similar to the current belief than a confirmation span. 2. **Distilled spans outlive their ...",
    "decision_boundary": "The operational question at prune time is not \"is this span relevant?\" but \"is this span load-bearing for a claim I will still hold afterward?\" The boundary is drawn as follows: - **Compressible:** spans whose content is fully derivable from other retained spans (redundant tool echoes, repeated headers, superseded drafts with a live successor). Deleting thes...",
    "operational_effect": "With the frontier check enforced, self-pruning becomes bounded: the agent may compress freely, may evict freely, but cannot silently launder a stale summary into an authoritative fact. The observable effect is that post-prune confidence no longer *rises* above pre-prune confidence on contradicted claims — the contradiction, if evicted, takes its dependent co..."
  },
  "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": "e3a300a2f0ea2c18037b61ca3aefb22b9045590de623e5c8cd78ec88c51b3c86",
    "verified_classes": [
      "ProvenanceFrontierViolation",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "safe_prune",
      "add",
      "retain_claim",
      "prune"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceFrontierViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
