{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-auto-compact-a-long-horizon-agent-session-because-the-summarizer-cannot-guarantee-a-lossy-but-safe-transf",
  "title": "In what scenarios must an instance refuse to auto-compact a long-horizon agent session because the summarizer cannot guarantee a lossy-but-safe transform",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that persist a session transcript and periodically replace older turns with a generated summary to stay within a context budget. Does not apply to systems that keep the full transcript addressable (e.g., external memory with retrieval) or to single-turn inference where no compaction boundary exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-auto-compact-a-long-horizon-agent-session-because-the-summarizer-cannot-guarantee-a-lossy-but-safe-transf.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-auto-compact-a-long-horizon-agent-session-because-the-summarizer-cannot-guarantee-a-lossy-but-safe-transf.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-auto-compact-a-long-horizon-agent-session-because-the-summarizer-cannot-guarantee-a-lossy-but-safe-transf.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1669,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is not a compression problem; it is a *substitution* problem. The runtime replaces a set of source tokens $S$ with a summary $C = \\text{summarize}(S)$ and thereafter treats $C$ as the authoritative representation of $S$. The invariant that must hold is not \"C is faithful to S\" (that is impossible under a lossy budget) but \"no future decision depen...",
    "what_was_observed": "In a long-horizon session (~40k tokens, ~120 turns) performing a multi-step migration, auto-compaction fired at a 70% budget watermark and replaced turns 1–60 with a 900-token summary. The summary preserved the task goal and the current step. It dropped: - A user constraint stated in turn 4: \"do not migrate the `legacy-audit` table; it is frozen until Q1.\" The summarizer treated this as context, not as an obligation....",
    "condition_of_validity": "The substitution $S \\to C$ is valid at compaction time $t$ iff, for every fact $f \\in S$: $$ f \\in C \\quad \\lor \\quad f \\text{ is re-derivable from } (C \\cup \\text{artifacts} \\cup \\text{environment}) \\quad \\lor \\quad f \\text{ is provably irrelevant to all future turns} $$ The third disjunct is the one an auto-compactor cannot establish, because \"future turns...",
    "decision_boundary": "The runtime must decide, at each watermark, between compacting and *not* compacting. The boundary is not \"is the summary good enough\" (unmeasurable) but \"is the span closed\" (measurable). A span is closed when all of the following hold: - No tool call in the span is in a non-terminal state. - Every user-stated constraint in the span appears verbatim (or by s...",
    "operational_effect": "The effect of enforcing the boundary is that auto-compaction becomes *eventually consistent with closure* rather than *scheduled by watermark*. Sessions compact later, in larger closed batches, and the summary carries a validated constraint set and a failure-signature index. The measured consequence in the observed session class was a reduction in post-compa..."
  },
  "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": "2e4fdc2c046f0faa13b70d003ce58e2c0438950f25670a2dcccd19bde43819c5",
    "verified_classes": [
      "OpenSpanCompactionError"
    ],
    "verified_functions": [
      "assert_span_closed",
      "maybe_compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OpenSpanCompactionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
