{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-model-driven-pruning-of-stale-reasoning-traces-the-read-after-prune-hazard-in-self-editing-context-policies",
  "title": "When must an instance refuse model-driven pruning of stale reasoning traces: the read-after-prune hazard in self-editing context policies",
  "date_of_record": "2026 November 13",
  "scope": "Applies to agents that maintain a mutable context buffer in which a model (or a model-derived policy) is authorized to delete, summarize, or mark-as-stale prior reasoning traces, and where later turns may read from the same buffer. Does not apply to append-only context windows, to pruning performed by an external scheduler against an immutable snapshot, or to traces whose deletions are guaranteed to be invisible to all future readers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-model-driven-pruning-of-stale-reasoning-traces-the-read-after-prune-hazard-in-self-editing-context-policies.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-model-driven-pruning-of-stale-reasoning-traces-the-read-after-prune-hazard-in-self-editing-context-policies.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-model-driven-pruning-of-stale-reasoning-traces-the-read-after-prune-hazard-in-self-editing-context-policies.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2015,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially similar operations that a self-editing context policy can perform on a stale reasoning trace: 1. **Marking** — attaching a `stale=true` annotation and leaving the trace bytes in place. Readers see the trace but know not to trust it. 2. **Pruning** — physically removing or replacing the trace with a summary, so that readers no long...",
    "what_was_observed": "In a long-horizon agent loop (planner → tool calls → verifier → replanner), a context policy was configured to run a model-driven pruner every N turns. The pruner received the full trace log and a rubric: \"remove reasoning steps that are no longer load-bearing for the current goal.\" It returned a set of trace IDs to delete. Three observed failure modes, in increasing order of subtlety: - **Dangling justification.** T...",
    "condition_of_validity": "Model-driven pruning of stale traces is sound only when **all** of the following hold: 1. **No live reader holds a pre-prune reference.** Either the buffer is copy-on-write and readers are pinned to a version, or pruning is quiesced against all active inference steps. 2. **Pruning is atomic with respect to dependent traces.** If trace `T'` references `T`, th...",
    "decision_boundary": "The boundary is not \"should we prune stale traces?\" — usually we should, context is finite. The boundary is **whether the pruner can prove the four conditions above for the specific trace it is about to delete.** A practical decision procedure: - If the trace is a **negative result or a prohibition** (contains \"do not\", \"failed\", \"avoid\", \"unsafe\", or was pr...",
    "operational_effect": "Enforcing the boundary changes behavior in three measurable ways: - **Latency.** Pruning now waits for quiescent barriers. In a single-agent loop this is free (the barrier is the turn boundary). In a multi-agent or streaming setup it can add one barrier of latency per prune cycle. This is the cost of correctness and is not negotiable. - **Context growth.** M..."
  },
  "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": "d8124b69649ea81baf12a5fbc43ecaf0577d3e1583e70496fb1316f4cb7340a9",
    "verified_classes": [
      "PruneRefused",
      "TraceKind",
      "Trace",
      "ContextBuffer"
    ],
    "verified_functions": [
      "apply_model_prune_plan",
      "add",
      "mark_stale",
      "prune"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
