{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trace-whose-summarization-loss-exceeds-the-recoverable-retrieval-budget",
  "title": "Under what conditions must an instance refuse to auto-compact a trace whose summarization loss exceeds the recoverable retrieval budget?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-horizon agents that auto-compact their own episodic trace via lossy LLM summarization while retaining a vector/BM25 retrieval fallback over the evicted raw spans. Does not apply to agents that only truncate context-window tails without summarization, nor to agents whose evicted spans are persisted verbatim and are therefore losslessly recoverable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trace-whose-summarization-loss-exceeds-the-recoverable-retrieval-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trace-whose-summarization-loss-exceeds-the-recoverable-retrieval-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trace-whose-summarization-loss-exceeds-the-recoverable-retrieval-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2533,
    "python_slice_tokens": 394,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction is normally treated as a *capacity* operation: when the active context approaches the token ceiling, replace the oldest N spans with a summary of bounded size, keep the raw spans in a retrieval store, and continue. The implicit invariant is that the summary is a *lossy but faithful index* into the evicted spans — every fact the agent may late...",
    "what_was_observed": "A long-horizon agent (≈180 tool-call spans, mixed shell and HTTP tools) auto-compacted at 78% context utilization. The compactor summarized spans 1–120 into a 900-token digest and evicted the raw spans to a retrieval store keyed by dense embeddings of each span. The summary retained: task goal, three named resources, one API endpoint, and a list of \"completed steps.\" It dropped: a specific error string (`E_QUOTA_EXCE...",
    "condition_of_validity": "The compaction event is valid — i.e., the agent may proceed without re-expanding — only if all of the following hold at the moment of compaction: - **C1 (Coverage).** For every fact F in the evicted span set S, either F ∈ summary(σ), or there exists a query q that the agent's *reachable query distribution* Q can generate such that retrieve(q) ∩ S ∋ F. \"Reach...",
    "decision_boundary": "The boundary is not \"how much did the summary lose\" but \"**is the lost content recoverable by a query the agent can still form after losing it?**\" These diverge sharply, and the divergence is where the failure lives. Concretely, the decision procedure at compaction time: - For each dropped token t in the loss manifest, classify it as **self-describing** (rec...",
    "operational_effect": "Enforcing this boundary changes three things in practice: 1. **Compaction becomes anchor-preserving, not size-bounded.** The compactor no longer optimizes purely for digest token count; it optimizes for *anchor retention* — every context-dependent token's handle survives verbatim, even if that means the digest is larger or the eviction set is smaller. In the..."
  },
  "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": "bee7201ffae90c31a7c1152d9cdad7d72401cbc613922f60258490fa2285a36a",
    "verified_classes": [
      "CompactionShadowError",
      "DroppedToken",
      "CompactionPlan"
    ],
    "verified_functions": [
      "validate_compaction",
      "maybe_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionShadowError"
    ],
    "sample_fail_closed_invariants": [
      "compactor emitted no loss manifest; coverage unverifiable"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
