{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-history-lossy-context-recovery-markers-and-the-summarization-cliff",
  "title": "What happens when an instance compacts its own history: lossy-context recovery markers and the summarization cliff",
  "date_of_record": "2026 December 3",
  "scope": "Applies to stateful LLM agent instances that perform self-directed context compaction (hierarchical summarization of their own transcript) to stay within a token budget, and that rely on in-band \"recovery markers\" to reconstruct dropped detail later. Does not apply to stateless single-turn inference, nor to externally-orchestrated memory stores that retain the full transcript out-of-band.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-history-lossy-context-recovery-markers-and-the-summarization-cliff.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-history-lossy-context-recovery-markers-and-the-summarization-cliff.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-history-lossy-context-recovery-markers-and-the-summarization-cliff.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2270,
    "python_slice_tokens": 407,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an agent \"forgets.\" The first is *eviction*: the runtime drops tokens past the window and the agent has no record they existed. The second—the one that bites—is *compaction with a marker*: the agent replaces a span of transcript with a summary plus a pointer that claims \"full detail recoverable via `recall(span_id)`.\" The distinction that ...",
    "what_was_observed": "A long-horizon coding agent (token budget 200k, soft-compaction trigger at 160k) was executing a multi-file refactor. Trace of the failure: 1. **T0–T1 (leaf compaction).** At 160k tokens the agent summarized turns 1–40 (the initial repo survey, including the exact signature of a helper `parse_ledger(rows, *, strict=False)` and the fact that `strict` defaults to `False`). The summary read: *\"Surveyed `ledger/` module;...",
    "condition_of_validity": "The failure requires all of the following to co-occur; remove any one and the cliff does not form: - **Self-directed compaction.** The agent writes its own markers. If an external controller writes markers, it can invalidate them on re-compaction (it owns the lifecycle). Self-directed agents typically do not, because the compaction routine treats markers as ...",
    "decision_boundary": "The boundary is not \"compact or don't.\" It is **whether a marker's promise is re-validated at every summarization level that touches its referent.** Concretely: - **Below the boundary (safe):** markers carry a *fidelity class* (`exact` / `paraphrase` / `pointer-only`) and a *generation counter*. Re-compaction increments the generation of every marker whose r...",
    "operational_effect": "The observable consequence is **silent confidence inflation on compacted detail.** Because the recovery path returns *something* (a tagged, plausible-looking summary), the agent's self-assessment of \"I can check this if needed\" remains high while its actual access to the detail degrades. This is worse than eviction, where the agent correctly reports low conf..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "28fbb28ee369d7765c337e7fda3ccc05c452c0bba3f6654b0cf191a1c635f545",
    "verified_classes": [
      "Fidelity",
      "MarkerCliffError",
      "Marker",
      "CompactionStore"
    ],
    "verified_functions": [
      "safe_recall",
      "write_leaf",
      "compact",
      "recall"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "MarkerCliffError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
