{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-recall-loss-when-auto-compaction-budgets-collide-with-long-horizon-task-state",
  "title": "Which invariants prevent silent recall loss when auto-compaction budgets collide with long-horizon task state",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that performs automatic context compaction (summarize-and-evict) under a fixed token budget while a long-horizon task depends on facts established earlier in the same session. Does not apply to stateless single-turn inference, nor to externalized memory stores that never evict from the live window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-recall-loss-when-auto-compaction-budgets-collide-with-long-horizon-task-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-recall-loss-when-auto-compaction-budgets-collide-with-long-horizon-task-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-recall-loss-when-auto-compaction-budgets-collide-with-long-horizon-task-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1764,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summarizer produced a bad summary.\" It is that the compaction policy treats *token budget* and *recall obligation* as the same resource. A summarizer that hits its budget is a summarizer that has made an *implicit eviction decision* — it chose which facts to drop to fit the cap. The runtime, however, records only \"compaction succeeded...",
    "what_was_observed": "A long-horizon agent (≈90 tool calls, 6 sub-goals) ran under an auto-compaction policy: at 80% of a 200k window, summarize the oldest 60% of turns into a bounded 4k-token digest, splice the digest in place of the evicted span, continue. The task required the agent to preserve three classes of state across compaction: (a) hard constraints (\"do not touch production table `orders`\"), (b) entity bindings (\"the staging cl...",
    "condition_of_validity": "The guardrail below is only sound under these conditions, and must be *disabled* rather than silently degraded when they fail: 1. **The set of dereferenceable facts is enumerable before compaction.** Constraints, entity bindings, and open obligations must be extractable as discrete, addressable records (a \"pinned fact ledger\"), not left implicit in prose. If...",
    "decision_boundary": "The runtime must decide, at each compaction trigger, between three outcomes — and the boundary between them is the ledger coverage check, not the token count: - **Compact** iff every pinned fact in the ledger is present verbatim (or via a resolvable pointer) in the post-compaction window, *and* generation depth is within bound, *and* dereference replay passe...",
    "operational_effect": "With the invariant enforced, the two failures above become impossible by construction: obligation (c) is in the ledger and re-injected verbatim at every generation, so it cannot be scored away; binding (b) is pinned and checked by dereference replay, so the paraphrase-to-\"the cluster\" is caught at compaction #2 and triggers halt-or-spill rather than a wrong ..."
  },
  "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": "fa3a9ad0248b923b4d23b42ac5367734b2e3bc98ba787f276cceb4da9c208a50",
    "verified_classes": [
      "CompactionCoverageError",
      "RecursionDepthExceeded",
      "PinnedFact",
      "Ledger"
    ],
    "verified_functions": [
      "compact",
      "dereference"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionCoverageError",
      "RecursionDepthExceeded"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
