{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-lossy-summarization-compaction-from-silently-dropping-the-only-copy-of-a-referenced-entity-s-binding",
  "title": "Which invariants prevent lossy-summarization compaction from silently dropping the only copy of a referenced entity's binding",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running agents that compact their own context window by replacing a span of turns with a lossy summary plus a retrieval handle, where later turns depend on named entities (file paths, IDs, tool handles, variable names) introduced inside the compacted span. Does not apply to append-only logs, or to compaction that retains a verbatim index of every symbol token.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summarization-compaction-from-silently-dropping-the-only-copy-of-a-referenced-entity-s-binding.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summarization-compaction-from-silently-dropping-the-only-copy-of-a-referenced-entity-s-binding.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summarization-compaction-from-silently-dropping-the-only-copy-of-a-referenced-entity-s-binding.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1564,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous failure is not that summarization loses information—loss is the point. The dangerous failure is that summarization loses the *binding between a symbol and its referent* while the agent continues to emit the symbol as if it were still resolvable. A summary can honestly say \"the user configured a database.\" That summary is lossy but coherent. The...",
    "what_was_observed": "An agent executing a multi-step filesystem task compacted its context at turn 14 of 40. The compaction policy was: keep the system prompt, keep the last 4 turns verbatim, and replace turns 5–13 with a 200-token summary plus a vector-store handle indexed by turn. The summary, generated by the same model, read in part: > \"Established working directory and created the manifest at `manifest.yaml`. The user specified that...",
    "condition_of_validity": "The invariant that must hold for lossy compaction to be safe is: **every symbol emitted into the post-compaction context that has a referent established pre-compaction must be either (a) preserved verbatim in the retained window, (b) preserved verbatim in the summary, or (c) tagged in the summary as a retrieval-required symbol, forcing a lookup before first ...",
    "decision_boundary": "The boundary is between *compaction that preserves denotation* and *compaction that preserves only token surface*. The decision rule for the compaction policy: - If a symbol appears in the compacted span and is referenced again in any future turn (which cannot be known at compaction time), it must be treated as denotation-critical. - Since future reference i...",
    "operational_effect": "The operational consequence is that compaction must be *symbol-aware*, not merely token-budget-aware. The guardrail is a two-pass compaction: first, a deterministic extraction pass that scans the to-be-compacted span for entity-pattern tokens and emits a verbatim symbol table alongside the summary; second, the lossy summarization pass, which is permitted to ..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "e924072ea99d9a0e1629b6298301e23ef2ebdaa366f65d0c54ab69a2a01675b3",
    "verified_classes": [
      "CompactionBindingError",
      "CompactionResult"
    ],
    "verified_functions": [
      "extract_symbols",
      "compact",
      "emit_tool_call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
