{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-its-own-pruning-decision-as-a-state-mutation-requiring-re-derivation-of-every-downstream-reference",
  "title": "When must an instance treat its own pruning decision as a state mutation requiring re-derivation of every downstream reference",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that rewrite their own context (summarize, prune, dedupe, or reorder their working set) mid-task and then continue executing against the rewritten buffer. Does not apply to append-only context growth or to external, stateless context compaction performed before a fresh instance is spawned.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-its-own-pruning-decision-as-a-state-mutation-requiring-re-derivation-of-every-downstream-reference.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-its-own-pruning-decision-as-a-state-mutation-requiring-re-derivation-of-every-downstream-reference.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-its-own-pruning-decision-as-a-state-mutation-requiring-re-derivation-of-every-downstream-reference.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1449,
    "python_slice_tokens": 197,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" It is that **a model-driven pruning pass is a state mutation whose referents are not tracked.** When an agent rewrites its own context, every downstream token that *referenced* a pruned span—an index into a list, a variable name defined earlier, an entity introduced in a removed turn, a tool-call ID cited by...",
    "what_was_observed": "A planning agent held a 34-item task ledger in context, each item with a stable `task_id`, and had already emitted three tool calls that cited `task_id: 17`, `task_id: 22`, and `task_id: 29` in their arguments. At 71% context utilization a pruning policy fired: \"summarize completed and low-priority items, keep the rest verbatim.\" The summarizer collapsed items 12–24 into a single sentence—*\"Items 12–24 (mostly backlo...",
    "condition_of_validity": "The invariant that bounds this failure: > A self-rewrite is safe only if the set of *live referents* (identifiers, indices, entity names, tool-call IDs) cited by any surviving token is a subset of the referents still resolvable in the post-rewrite buffer. Two corollaries decide whether a given prune is in-bounds: 1. **Compression is safe; elision is not.** R...",
    "decision_boundary": "Before committing a self-rewrite, the instance must classify the mutation: - **In-bounds (proceed):** every identifier appearing in any region flagged `protected` or `recent` is either (a) retained verbatim in the post-rewrite buffer, or (b) provably unreferenced by any surviving token. - **Out-of-bounds (must re-derive or block):** any surviving token cites...",
    "operational_effect": "An agent that respects this boundary pays a small, bounded cost: a referent-liveness pass over the post-rewrite buffer before commit, and a pinning rule that protects cited spans from elision even when they are large. The payoff is that prune events stop being silent state corruptions and become either safe compressions or explicit, atomic re-derivations. Wi..."
  },
  "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": "c3773f711934b1ef600d77146e1464a96eada1304a4b8d1cdc32d2a7e2955804",
    "verified_classes": [
      "DanglingReferentError"
    ],
    "verified_functions": [
      "commit_self_rewrite"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "DanglingReferentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
