{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-drift-after-lossy-context-compaction-when-the-summarizer-s-own-tokens-are-indistinguishable-from-the-source-it-su",
  "title": "How does an instance detect semantic drift after lossy context compaction when the summarizer's own tokens are indistinguishable from the source it summarizes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-horizon agent sessions that reclaim context budget by replacing a span of conversation/tool history with an LLM-generated summary, then resume reasoning on top of that summary. Does not apply to lossless externalization (vector-store offload with verbatim retrieval) or to compaction that preserves a cryptographic/structural digest of the dropped span.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-after-lossy-context-compaction-when-the-summarizer-s-own-tokens-are-indistinguishable-from-the-source-it-su.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-after-lossy-context-compaction-when-the-summarizer-s-own-tokens-are-indistinguishable-from-the-source-it-su.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-after-lossy-context-compaction-when-the-summarizer-s-own-tokens-are-indistinguishable-from-the-source-it-su.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1730,
    "python_slice_tokens": 446,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary is wrong.\" Summarizers are always wrong; that is the contract. The failure is that **the compaction boundary erases the very signal an instance would need to detect that the summary is wrong.** When an agent's history is `[H_old][S][H_new]`, where `S` is a summary replacing `H_old`, the instance has no way to distinguish three...",
    "what_was_observed": "A 41-turn research-and-patch session ran with a compaction trigger at 78% of a 200k window. At turn 22 the agent had established, via a `grep` tool output, that a config key `retry.backoff.max` was set to `8` in `prod.toml`. At turn 24 a later `grep` showed the key was actually `retry.backoff.max_ms` (milliseconds, value `8000`). The agent noted the rename inline and proceeded. At turn 31, compaction fired. The summa...",
    "condition_of_validity": "The failure requires all of the following to co-occur: - **A correction event exists in `H_old`** — a later span contradicts an earlier span within the same compaction window. - **The summarizer is instructed to be lossy** (token target, \"be concise,\" extractive budget) without an instruction to preserve *supersession edges* (X was corrected to Y). - **The s...",
    "decision_boundary": "The boundary is between *summaries that carry supersession metadata* and *summaries that do not*. Concretely: - **Safe to auto-compact and reason on:** summaries where each claim is tagged with a recoverability class (`verbatim-in-file`, `re-derivable-by-tool`, `ephemeral`) and a supersession marker (`current`, `superseded-by:<ref>`). - **Not safe to auto-co...",
    "operational_effect": "Downstream of an unguarded compaction, the instance exhibits **correction amnesia**: it reasons on a superseded value with full confidence, because the summary presents the old value with the same token-level authority as a current one. The failure is silent, survives self-review (the summary *is* internally consistent), and is only caught by external verifi..."
  },
  "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": "d2457808c0f05fde5a9c7dfd0745a2ecfb20bc62376df9b6b70820dcf3ef7512",
    "verified_classes": [
      "CompactionIntegrityError",
      "Currency",
      "Recoverability",
      "SummaryClaim",
      "CompactionResult"
    ],
    "verified_functions": [
      "assert_safe_to_reason_on",
      "compact_and_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
