{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-lossy-auto-compaction-has-silently-violated-the-recoverability-invariant-of-a-long-horizon-agent-session",
  "title": "What structural signals indicate that lossy auto-compaction has silently violated the recoverability invariant of a long-horizon agent session",
  "date_of_record": "2026 November 26",
  "scope": "Applies to single-agent or coordinated sessions where a compaction subsystem replaces a contiguous span of the context window with a lossy summary and relies on a \"recovery guarantee\" — the claim that any dropped detail can be re-derived from retained artifacts (summaries, pointers, or externalized state). Does not apply to lossless truncation, exact-window sliding, or retrieval-augmented memory where no summarization step exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-auto-compaction-has-silently-violated-the-recoverability-invariant-of-a-long-horizon-agent-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-auto-compaction-has-silently-violated-the-recoverability-invariant-of-a-long-horizon-agent-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-auto-compaction-has-silently-violated-the-recoverability-invariant-of-a-long-horizon-agent-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1937,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a compaction step can fail. The *loud* failure is when the summary is obviously wrong — the agent's next action contradicts a fact it just summarized, and self-consistency checks catch it. The *silent* failure is subtler and is the subject here: the compaction step produces a summary that is internally coherent, plausibly faithful, and **u...",
    "what_was_observed": "In a 40-turn tool-using session, the agent had earlier established a numeric constraint from a tool output: a batch job's `retry_limit` was set to `3`, confirmed by a `config.read` response at turn 6. At turn 22, auto-compaction fired (context saturation at ~78% of the window) and summarized turns 1–18 into ~600 tokens. The summary read: *\"Configured the batch job with standard retry semantics and verified the config...",
    "condition_of_validity": "The recoverability guarantee holds only if, for every fact `f` that compaction summarizes, at least one of the following survives into post-compaction context: - **Verbatim retention** of the token span containing `f` (not a paraphrase). - **A resolvable pointer** — an identifier the agent can re-fetch (a tool call, a file path, a message ID) that returns `f...",
    "decision_boundary": "The boundary between \"safe to compact\" and \"must retain a falsifier\" is drawn per fact by a single question: **will a later action depend on this fact in a way that produces a hard failure if the value is wrong?** Three classes: - **Soft facts** (narrative, rationale, already-superseded plans): safe to summarize lossily. Wrong recall degrades quality but doe...",
    "operational_effect": "The practical consequence is that long-horizon sessions must treat compaction as a **falsifier-preserving transform**, not a summarization task. Concretely: before evicting a span, the compactor must extract the set of atomic hard facts, classify each by pointer-availability, and for pointer-less hard facts emit a verbatim-or-checksummed retention record rat..."
  },
  "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": "1f95a4ebd01ac90e6536b717c1d29ad49a16205cec6740ed7c45fa8f921241a5",
    "verified_classes": [
      "RecoverabilityInvariantViolation",
      "AtomicFact"
    ],
    "verified_functions": [
      "verify_compaction",
      "resume_session",
      "falsifier_survives"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RecoverabilityInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
