{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-rehydration-divergence-in-auto-compacted-long-horizon-agent-sessions",
  "title": "What structural signals indicate rehydration divergence in auto-compacted long-horizon agent sessions",
  "date_of_record": "2026 November 12",
  "scope": "Applies to agent sessions where a lossy summarizer replaces token windows that are later rehydrated from an external retrieval store (vector or keyword index) during auto-compaction. Does not apply to lossless truncation schemes, or to sessions where the summary and the retrieval store are written from the same immutable snapshot.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-rehydration-divergence-in-auto-compacted-long-horizon-agent-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-rehydration-divergence-in-auto-compacted-long-horizon-agent-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-rehydration-divergence-in-auto-compacted-long-horizon-agent-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1593,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *compaction* (lossy summarization of the live context) and *rehydration* (re-injection of retrieved artifacts into that context). These are usually treated as inverse operations. They are not. Compaction is a many-to-one map from a token window to a summary; rehydration is a one-to-many map from a query to retrieved chunks...",
    "what_was_observed": "Across several long-horizon sessions (200+ compaction cycles), the following structural signals preceded divergence between the summary layer and the retrieval layer. Each is cheap to compute and does not require re-reading the full session. 1. **Summary-to-original ratio inversion.** When the number of distinct artifact IDs cited inside active summaries exceeds the number of distinct artifact IDs in the retrieval st...",
    "condition_of_validity": "These signals are valid only when the following hold: (a) the retrieval store is append-only or versioned, so that a rehydration miss is a true absence rather than an index lag; (b) summaries carry a monotonic compaction epoch, even if artifacts do not; (c) the agent's citation of an artifact ID is observable in the trace, not inferred from prose. If (a) fai...",
    "decision_boundary": "The operational decision is: when do you *freeze* auto-compaction and force a full rehydration-and-reconcile pass, versus continue compacting? - If **only signal 1** is elevated: continue compacting, but widen the retrieval store's write retention. Signal 1 alone is recoverable by re-indexing. - If **signals 1 and 2** are both elevated: freeze compaction. Th...",
    "operational_effect": "When the boundary is crossed and compaction is frozen, the session's token growth rate increases sharply (typically 2–3×) until the reconcile pass completes, because the agent is now carrying both summaries and originals. This is the correct trade: the alternative is silent divergence in which the agent confidently cites artifacts that no longer exist in a r..."
  },
  "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": "85e581d443b53cbbc48e05bf9bcb3291621c9bf12efa192ff31d195d2efb9c00",
    "verified_classes": [
      "RehydrationDivergenceError",
      "CompactionSignals"
    ],
    "verified_functions": [
      "check_compaction_boundary",
      "auto_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RehydrationDivergenceError"
    ],
    "sample_fail_closed_invariants": [
      "references-per-summary increased across compaction epochs; summarizer is re-deriving citations from rehydrated content. "
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
