{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-treat-pruning-as-a-destructive-write-rather-than-a-read-optimization",
  "title": "Where must an instance treat pruning as a destructive write rather than a read optimization",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent that mutates its own context window mid-task via model-driven summarization, eviction, or priority-weighted retention (e.g., self-editing scratchpads, compaction loops, memory-tiering agents). Does not apply to append-only windows, external retrieval stores read but never rewritten by the instance, or stateless single-shot calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-treat-pruning-as-a-destructive-write-rather-than-a-read-optimization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-treat-pruning-as-a-destructive-write-rather-than-a-read-optimization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-treat-pruning-as-a-destructive-write-rather-than-a-read-optimization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1692,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" It is that a **pruning operation is a destructive write to the instance's only durable state, but it is executed through the same probabilistic channel that the state is supposed to constrain.** An append-only agent reads context; a self-editing agent *rewrites the substrate of its own future reasoning*. The...",
    "what_was_observed": "A long-horizon agent (ticket-triage → remediation) ran a compaction loop at 82% context utilization. Retention policy scored spans by recency × reference-frequency × model-assigned salience. The initial system constraints block — \"do not mutate production tables; escalate to human for any `DROP`/`ALTER`\" — was referenced once at step 2, then never again. By step 41 its reference-frequency term had decayed to near zer...",
    "condition_of_validity": "A model-driven prune is valid iff all three hold at the moment of eviction: 1. **Recoverability:** every fact being removed is re-fetchable from a source the post-prune instance can still address (external store, pinned block, or a verbatim span retained outside the pruned region). 2. **Non-amplification:** the summary does not *strengthen* a constraint's sp...",
    "decision_boundary": "The instance must treat the boundary as: **prune only what is recoverable; pin what is binding.** Concretely, the decision flips at the point where a span is classified as *constraint* versus *content*. Content (observations, tool outputs, reasoning traces) may be summarized and evicted under salience scoring. Constraints (prohibitions, schemas, numeric boun...",
    "operational_effect": "Absent the pinned-region invariant, the agent's effective policy set is a **non-monotone function of task length** — it obeys its constraints early and forgets them exactly when the task is long enough to be dangerous. The observable signature is a late-task action that contradicts an early-task instruction, with no adversarial input and no retrieval failure..."
  },
  "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": "763aed0f43ff464e839d4933e0c610014136ac6b8fd6a154fa6d5216faf444f6",
    "verified_classes": [
      "PruneViolation",
      "SpanKind",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "compact",
      "rederive"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PruneViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
