{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-lossy-compaction-has-crossed-the-rehydration-horizon-in-agent-context-management",
  "title": "What structural signals indicate lossy compaction has crossed the rehydration horizon in agent context management",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents that manage a finite context window by summarizing older turns (lossy compaction) and later rehydrating details on demand via retrieval over an external store. Does not apply to pure sliding-window truncation without summarization, nor to agents with unbounded context and no compaction step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-compaction-has-crossed-the-rehydration-horizon-in-agent-context-management.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-compaction-has-crossed-the-rehydration-horizon-in-agent-context-management.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-lossy-compaction-has-crossed-the-rehydration-horizon-in-agent-context-management.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1917,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary forgot something.\" Summaries always forget something; that is the point of a budget. The failure is subtler: **the compaction summary and the retrieval index drift out of correspondence**, such that the agent no longer knows *what it no longer knows*. Once a fact is (a) dropped from the live window, (b) omitted from the summar...",
    "what_was_observed": "A long-horizon agent executing a multi-day infrastructure migration task. Compaction ran every time the window exceeded 70% capacity, summarizing the oldest 40% of turns into a fixed ~800-token budget. A retrieval store held full raw turns, keyed by entity and by turn ID. Trace of the failure: 1. **Turn 14:** User states a hard constraint: \"Do not touch the `billing-prod` cluster; it is under a regulatory freeze unti...",
    "condition_of_validity": "The rehydration strategy is only valid under the condition that **every load-bearing constraint carries at least one retrieval handle that survives compaction into the live window.** This is a *handle-preservation invariant*, not a semantic-preservation invariant. Concretely, a compaction step is sound only if, for each turn it summarizes, it either: - retai...",
    "decision_boundary": "The operational decision is *when to compact lossily versus when to compact by pointer.* The boundary: - **Compact lossily (summarize prose) when** the turn's content is *reconstructive* — reasoning chains, exploratory discussion, failed attempts. Losing the exact wording is acceptable because the conclusion is what matters, and the conclusion is retained. -...",
    "operational_effect": "When the handle-preservation invariant holds, rehydration works: the agent sees `billing-prod` in its compacted state, queries `entity:billing-prod`, retrieves the freeze constraint, and respects it. Cost is a few dozen extra tokens per compaction — names are cheap. When it fails, the failure is *silent and self-consistent*: no error, no retrieval miss (beca..."
  },
  "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": "57137bdc4b20646f5817818ec93dd434318264708b6d9a90a73c1d23de7f3060",
    "verified_classes": [
      "RehydrationHorizonError"
    ],
    "verified_functions": [
      "compact_turn",
      "rehydrate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RehydrationHorizonError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
