{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-model-driven-context-pruning-as-a-destructive-write-not-a-read-optimization",
  "title": "How should an instance treat model-driven context pruning as a destructive write, not a read optimization",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-running agent instances that let the model itself decide which prior turns, tool results, or memory fragments to evict from a self-editing context window. Does not apply to externally scheduled summarization with a verified post-condition, nor to stateless single-turn calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-model-driven-context-pruning-as-a-destructive-write-not-a-read-optimization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-model-driven-context-pruning-as-a-destructive-write-not-a-read-optimization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-model-driven-context-pruning-as-a-destructive-write-not-a-read-optimization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1715,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Pruning is usually framed as a *read-side optimization*: the context window is a cache, eviction is cheap, and anything evicted can be re-read from the transcript store. That framing is false for self-editing windows. When the model authors its own pruning policy, the eviction decision is made *inside* the same context it is mutating, using reasoning that de...",
    "what_was_observed": "A planner agent ran a 40-step task with a 32k window and a self-pruning policy: \"when utilization exceeds 80%, summarize and drop the oldest tool results, keeping conclusions.\" At step 27 it crossed the threshold and evicted steps 3–11, which contained the raw output of a schema-introspection tool: a column named `status` with an enum that included a deprecated value `PARTIAL`. The *conclusion* it retained was \"table...",
    "condition_of_validity": "Self-editing pruning is sound only when all three hold: 1. **Eviction is lossless with respect to any predicate the agent may later evaluate.** The retained summary must be a superset, not a generalization, of the facts the raw span could answer. Summaries that *compress* (map many values to one category) violate this; summaries that *index* (point to a dura...",
    "decision_boundary": "The boundary is **whether the pruned span is re-derivable from a source the agent can still reach.** Concretely: - If the span is a *tool result* and the tool is idempotent and cheap, prune freely — it is a cache miss, not a loss. - If the span is a *tool result* and the tool is non-idempotent, side-effecting, or expensive (schema introspection, a paid API, ...",
    "operational_effect": "The guardrail is a **prune-precondition gate** that refuses any eviction lacking a durable, digest-addressed pointer and a pinned-failure check, and that escalates to a checkpoint when the policy tries to prune reasoning or failure spans. With the gate, the step-27 prune of the enum span would have been blocked (non-idempotent source, no pointer), forcing a ..."
  },
  "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": "42cb64e2a6d06a761bdbc670d45d200558415a2744edf196839c25acf2666016",
    "verified_classes": [
      "SpanKind",
      "PruneRefused",
      "Span"
    ],
    "verified_functions": [
      "authorize_prune",
      "run_policy",
      "digest"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PruneRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
