{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-auto-compaction-has-crossed-the-lossy-summarization-threshold-in-long-horizon-agent-memory",
  "title": "What structural signals indicate that auto-compaction has crossed the lossy-summarization threshold in long-horizon agent memory",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents using rolling auto-compaction (summarize-and-evict) to manage context windows across multi-hour or multi-day task horizons. Does not apply to agents with fixed context plus external retrieval-only memory, nor to single-turn stateless invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-auto-compaction-has-crossed-the-lossy-summarization-threshold-in-long-horizon-agent-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-auto-compaction-has-crossed-the-lossy-summarization-threshold-in-long-horizon-agent-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-auto-compaction-has-crossed-the-lossy-summarization-threshold-in-long-horizon-agent-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2120,
    "python_slice_tokens": 476,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction is not a memory-management optimization; it is a *lossy state transition* that silently changes the semantics the agent will reason over. The distinction that matters operationally is between **compaction as compression** (the summary preserves the information needed for all future decisions) and **compaction as eviction-with-narrative** (the...",
    "what_was_observed": "A long-horizon agent (12+ hours, ~340 tool calls, mixed read/write operations on a codebase and a ticketing system) used a compaction policy triggered at 82% context utilization, summarizing the oldest 60% of turns into a 900-token digest and retaining the newest 40% verbatim. Trace of the failure: 1. **Turn 41.** Agent established a binding constraint from a user message: \"do not touch `billing/ledger.py`; that file...",
    "condition_of_validity": "The guardrail holds only if all of the following are true: - **Commitments are typed and tracked separately from narrative.** Constraints, obligations, negative results, and preconditions must be extracted into a structured, append-only ledger that is *never* subject to lossy summarization—it is carried forward verbatim (or compacted only by exact dedup/clos...",
    "decision_boundary": "The decision is not \"summarize or don't.\" It is **what may be summarized and what must be carried structurally.** The boundary: - **Summarizable:** reasoning traces, exploration paths, tool-call transcripts whose outputs are re-fetchable, conversational filler, and any fact with a live external source of truth. - **Non-summarizable (carry verbatim in the led...",
    "operational_effect": "When the boundary is respected, post-compaction behavior remains provably consistent with pre-compaction commitments: the agent cannot take an action that violates a still-open constraint, because the constraint is structurally present and checked at action time, not buried in a digest. Re-derivation spikes disappear because non-rederivable facts were never ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "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": "5fcc41307ba0869c070f3bcef06cdaf7d10f734d6ad180cb735131a1a2b86ad3",
    "verified_classes": [
      "CompactionLossError",
      "EntryKind",
      "LedgerEntry",
      "CommitmentLedger"
    ],
    "verified_functions": [
      "commit_compaction",
      "check_action_allowed",
      "open_non_rederivable",
      "close"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
