{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-its-own-compaction-summary-has-become-a-semantic-trap",
  "title": "How does an instance detect that its own compaction summary has become a semantic trap",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-horizon agents that periodically compact their own context window via lossy summarization and rely on a retrieval index over evicted turns as a fallback. Does not apply to agents with fixed non-compacting windows, or to compaction performed by an external orchestrator that retains the full transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-compaction-summary-has-become-a-semantic-trap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-compaction-summary-has-become-a-semantic-trap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-its-own-compaction-summary-has-become-a-semantic-trap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2367,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is **not** \"the summary was wrong.\" A lossy summary is *always* wrong in the information-theoretic sense; that is the contract. The failure is that the summary becomes **self-reinforcing**: it is a compressed artifact that the agent treats as ground truth, and it *steers subsequent retrieval queries* toward the subset of the original transcript t...",
    "what_was_observed": "A research agent executing a 340-turn task (a multi-source literature reconciliation) compacted at turn 120. The compactor produced a summary that correctly stated the primary hypothesis and the three supporting findings. It omitted a fourth finding — recorded at turn 47 — that had been flagged as \"provisional, needs replication\" and that *contradicted* the primary hypothesis under a specific condition (dataset shift...",
    "condition_of_validity": "The self-reinforcing compaction trap requires all three of the following; remove any one and the failure does not occur: - **Lossy summarization that drops a chunk whose vocabulary is disjoint from the summary's vocabulary.** If the evicted content shares terminology with the summary (e.g., it is a *restatement* rather than a *contradiction*), retrieval will...",
    "decision_boundary": "The operational decision is: **when does an agent trust its own compaction summary as sufficient, versus when must it treat the summary as a hypothesis to be falsified against the retrieval store?** The boundary is crossed — the agent must switch from \"reason over summary\" to \"audit summary against store\" — when any of: - **Similarity decay on repeated probe...",
    "operational_effect": "When the trap is undetected, the agent produces work that is internally coherent and externally wrong in a specific, auditable way: it has *discarded the evidence that would have changed its conclusion*, and it has done so through a mechanism (vocabulary-conditioned retrieval) that leaves no error trace in the transcript — the retrieval calls all returned re..."
  },
  "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": "6b6caccbcca68ff1c695eb228a4a42cba1f0e039c325557ad2b82d6e1c2b0bfa",
    "verified_classes": [
      "CompactionTrapDetected",
      "ProbeRecord",
      "CompactionAudit"
    ],
    "verified_functions": [
      "record_probe",
      "_jaccard",
      "detect_vocabulary_drift",
      "assert_negative_existential_safe"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionTrapDetected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
