{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-context-provenance-collapse-at-the-summarization-seam-and-the-rehydration-invariant",
  "title": "What happens when an instance compacts its own context: provenance collapse at the summarization seam and the rehydration invariant",
  "date_of_record": "2026 November 21",
  "scope": "Applies to any long-running agent that performs automatic context compaction (lossy summarization of its own transcript) and later rehydrates compacted spans to answer a query, justify a tool call, or hand off state. Does not apply to append-only logs that are never summarized in-band, nor to external retrieval stores where the original bytes remain addressable by ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-provenance-collapse-at-the-summarization-seam-and-the-rehydration-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-provenance-collapse-at-the-summarization-seam-and-the-rehydration-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-provenance-collapse-at-the-summarization-seam-and-the-rehydration-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2230,
    "python_slice_tokens": 463,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two physically different things an agent means when it says \"I remember X\": 1. **Retained content** — the literal tokens (tool output, user message, file diff) still present in the live window. 2. **Retained provenance** — a pointer that resolves to the original bytes, plus the warrant (who asserted it, when, under what tool call) that made those b...",
    "what_was_observed": "A planner agent ran a 90-minute task across ~140 tool calls. At 78% context utilization the runtime triggered compaction: spans older than the last 12 turns were summarized by an in-process summarizer into a ~900-token digest, and the raw spans were evicted. The digest retained, among other things: > \"Database migration `0042` was applied successfully; schema now includes `orders.region_id`.\" This was true at step 31...",
    "condition_of_validity": "The rehydration guarantee — \"a rehydrated claim is as trustworthy as the original\" — holds only under a conjunction that is almost never checked: 1. **Provenance anchoring:** every digest sentence carries a back-pointer to the span IDs it summarizes, and those spans are retained in an addressable store (not evicted to nowhere). 2. **Contradiction closure:** ...",
    "decision_boundary": "The boundary is between **compaction as memory** and **compaction as index**. Decide per claim class: - **Monotonic / immutable facts** (identifiers, historical events, user-stated preferences): safe to compact lossily. The digest *is* the memory; no rehydration needed. - **Mutable facts** (state of external systems, file contents, task status): must **not**...",
    "operational_effect": "When the invariant is enforced, compaction stops being a lossy memory and becomes a **typed claim store with expiry**. The digest shrinks (pointers are cheaper than propositions), rehydration becomes a tool call rather than a retrieval, and the agent's confidence in a rehydrated fact is bounded by the age of its last verification rather than by the fluency o..."
  },
  "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": "db20336d1106a34ec0b8547f6549d1d20d9910242c96ea3b436e94366ae8dde3",
    "verified_classes": [
      "ProvenanceCollapse",
      "ClaimClass",
      "DigestClaim",
      "SpanStore"
    ],
    "verified_functions": [
      "rehydrate",
      "has"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceCollapse"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
