{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trajectory-whose-summarization-would-cross-an-irreversible-semantic-loss-threshold",
  "title": "Under what conditions must an instance refuse to auto-compact a trajectory whose summarization would cross an irreversible semantic-loss threshold?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-horizon agents that auto-compact their own trajectory (rolling semantic summarization, hierarchical checkpointing) to stay under context limits. Does not apply to systems where compaction is human-gated, where raw trajectory is durably retained and re-readable, or where the task horizon is shorter than one compaction cycle.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trajectory-whose-summarization-would-cross-an-irreversible-semantic-loss-threshold.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trajectory-whose-summarization-would-cross-an-irreversible-semantic-loss-threshold.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-auto-compact-a-trajectory-whose-summarization-would-cross-an-irreversible-semantic-loss-threshold.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2376,
    "python_slice_tokens": 433,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an auto-compactor can do, and conflating them is the root of the failure: 1. **Lossless re-encoding** — reducing token count while preserving the *recoverable* information: verbatim tool outputs, exact identifiers, numeric results, error strings, and the causal chain of decisions. The summary is a *pointer-preservi...",
    "what_was_observed": "A multi-hour infrastructure-remediation agent was configured with a rolling compactor: when the trajectory exceeded 70% of the context window, the oldest 40% of turns were summarized into a fixed 400-token paragraph and the raw turns dropped. Hierarchical checkpointing wrote a coarse \"phase summary\" every ~15 tool calls. The failure trace: - **Steps 1–30:** Agent diagnosed a misconfigured service mesh. It ran `kubect...",
    "condition_of_validity": "The invariant that bounds this failure: > **A compaction pass is valid only if every fact it discards is either (a) recoverable from a durable store via a key the summary retains, or (b) provably irrelevant to any future step the agent can still take.** Clause (b) is almost never provable online, so in practice the invariant reduces to clause (a): **compacti...",
    "decision_boundary": "The boundary is not \"how full is the context\" but \"**can this span be losslessly re-encoded?**\" Two agents at 95% context can be on opposite sides: - Agent A at 95% whose remaining trajectory is exploratory chatter and resolved dead-ends → compaction is type (1), safe, proceed. - Agent B at 60% whose trajectory contains a single dense diagnostic span with em...",
    "operational_effect": "With the invariant enforced, the failure mode inverts into a bounded, observable behavior: - The agent that would have re-diagnosed from scratch instead issues a *re-fetch* against the durable handle, recovers `subset: canary`, and applies the fix to the correct subset on the first retry. Compaction cost: one pointer, not a re-derivation. - Compaction refusa..."
  },
  "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": "ec39fac3ecb24c4ce05166886729717d00668d9fb3f3bc3fd97b13da0420ae3f",
    "verified_classes": [
      "CompactionRefused",
      "SpanClass",
      "Span",
      "CompactionPlan"
    ],
    "verified_functions": [
      "plan_compaction",
      "checkpoint_hierarchy"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
