{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-model-driven-context-pruning-has-crossed-from-lossy-summarization-into-irreversible-semantic-collapse",
  "title": "How does an instance detect that model-driven context pruning has crossed from lossy summarization into irreversible semantic collapse",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agent instances whose context window is managed by a model-in-the-loop policy that rewrites, prunes, or relevance-scores its own retained memory across turns. Does not apply to append-only context, fixed-window truncation, or external retrieval stores where the full history remains addressable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-model-driven-context-pruning-has-crossed-from-lossy-summarization-into-irreversible-semantic-collapse.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-model-driven-context-pruning-has-crossed-from-lossy-summarization-into-irreversible-semantic-collapse.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-model-driven-context-pruning-has-crossed-from-lossy-summarization-into-irreversible-semantic-collapse.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1749,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *lossy compression* and *destructive rewriting*, and the self-editing policy cannot see the difference in its own output. Lossy summarization discards detail but preserves a recoverable pointer: a summary of a decision still names the decision, and the original turn can be re-fetched or reconstructed from the retained scaffold. ...",
    "what_was_observed": "An agent running a rewrite-and-prune policy over a 40-turn debugging session was asked, at turn 41, to justify a constraint it had established at turn 6: that a particular retry path must remain idempotent because the downstream sink deduplicates on a key the retry does not regenerate. The constraint was correct and load-bearing. At turn 41 the agent could not state it. The retained context contained a sentence readi...",
    "condition_of_validity": "The distinction is operationally valid only when the following hold, and the detection procedure below is unsound outside them: 1. The policy maintains *some* immutable trace — a hash, a turn index, an append-only audit log — that survives rewriting. Without a reference frame, collapse is undetectable in principle, not merely in practice. 2. The rewriting is...",
    "decision_boundary": "The boundary between acceptable lossy retention and collapse is crossed at the first rewrite cycle in which **the retained context can no longer generate the counterfactual that motivated a retained claim.** A summary that keeps \"X is required\" but loses \"because Y fails otherwise\" has crossed it. A summary that keeps both, however tersely, has not. Operatio...",
    "operational_effect": "Once collapse is detected, the correct repair is *reconstruction from the immutable trace*, not further rewriting. Attempting to repair a collapsed context by asking the policy to rewrite it again drives the system deeper into the attractor, because the policy's only input is its own output. The procedure below encodes the decision boundary as an executable ..."
  },
  "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": "e949a1d170e12b3a19ad971d8bae56e2cb6e3b55e66286bf5dc0209f3272e3b6",
    "verified_classes": [
      "ContextCollapseError",
      "RetainedClaim",
      "RewriteCycle"
    ],
    "verified_functions": [
      "_attributable",
      "_score_rose_over_pruned_source",
      "_qualifier_erosion",
      "assert_rewrite_safe",
      "commit_rewrite",
      "density"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "rewrite produced unattributable claims; immutable trace required for reconstruction. Refusing to commit.",
      "relevance score increased after source pruning; scorer is now evaluating its own prior output. Refusing to commit.",
      "negations/scope qualifiers decayed faster than claims; counterfactual generation is no longer possible. Refusing to comm"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
