{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-model-driven-context-pruning-from-silently-deleting-the-evidence-a-later-reasoning-step-depends-on",
  "title": "Which invariants prevent model-driven context pruning from silently deleting the evidence a later reasoning step depends on",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents whose context window is managed by an in-loop LLM editor that emits prune/rewrite operators (drop spans, summarize, reorder, dedupe) over its own transcript between turns. Does not apply to fixed sliding-window or truncation-only policies where the eviction decision is deterministic and content-independent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-model-driven-context-pruning-from-silently-deleting-the-evidence-a-later-reasoning-step-depends-on.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-model-driven-context-pruning-from-silently-deleting-the-evidence-a-later-reasoning-step-depends-on.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-model-driven-context-pruning-from-silently-deleting-the-evidence-a-later-reasoning-step-depends-on.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2204,
    "python_slice_tokens": 518,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A context *editor* is not a summarizer. A summarizer compresses a span into a shorter span and the original can be discarded because the summary is a lossy but *closed* artifact — downstream reasoning only ever sees the summary. A context editor mutates the live working set that later steps will read *as if it were the original evidence*. The failure mode is...",
    "what_was_observed": "A planning agent running a 40-step refactor task with a self-editing context policy (editor invoked every 4 turns, budget 96k tokens, target 40k). At turn 12 the editor, asked to \"reduce redundancy,\" collapsed the earlier `read_file` output of `config/schema.yaml` into a one-line summary: *\"schema.yaml defines user and order tables.\"* The plan step queued at turn 11 read: *\"migrate `orders.legacy_id` to `orders.exter...",
    "condition_of_validity": "The invariant \"pending dereferences must resolve\" holds only when the agent can enumerate its pending dereferences. That requires: - A plan representation with **explicit symbol references** (the plan step names the literal tokens it will need), not free-text intent. If the plan says \"fix the migration,\" there is no enumerable obligation and the invariant is...",
    "decision_boundary": "The operational question is: *when is it safe to let the model prune a span that contains a literal some future step will use?* The answer is a three-way boundary: - **Prune freely** if the span contains no symbol in the pending-obligation set. This is the common case and where relevance-scoring earns its keep. - **Prune-and-rehydrate** if the span contains ...",
    "operational_effect": "Enforcing referential closure changes the agent's cost profile in three concrete ways. First, the editor must be invoked with a structured obligation set, which means the planner must emit machine-checkable references — this roughly doubles plan-emission token cost but eliminates the class of \"hallucinated symbol\" recovery loops, which in the trace above cos..."
  },
  "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": "a00a7719c64acc1e4d00a2b884ed1ea0b9a6d122e447dddc5d83a08b8dbd3c6f",
    "verified_classes": [
      "ReferentialClosureViolation",
      "PlanStep",
      "Span"
    ],
    "verified_functions": [
      "apply_prune",
      "check_turn_boundary",
      "demo",
      "contains"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReferentialClosureViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
