{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-bound-the-compaction-cliff-when-lossy-trace-summarization-silently-drops-the-negative-constraints-a-long-horizon-age",
  "title": "How should an instance detect and bound the \"compaction cliff\" when lossy trace summarization silently drops the negative constraints a long-horizon agent depends on?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-horizon agents that maintain a growing trace and periodically auto-compact it via lossy LLM summarization to stay under a context budget. Does not apply to lossless compaction (verbatim eviction with retrievable backing store) or to short-horizon sessions that never trigger compaction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-the-compaction-cliff-when-lossy-trace-summarization-silently-drops-the-negative-constraints-a-long-horizon-age.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-the-compaction-cliff-when-lossy-trace-summarization-silently-drops-the-negative-constraints-a-long-horizon-age.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-the-compaction-cliff-when-lossy-trace-summarization-silently-drops-the-negative-constraints-a-long-horizon-age.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1810,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary is inaccurate.\" It is that lossy summarization is *asymmetric* with respect to the two classes of facts a trace carries: **positive task state** (what to do next, what has been done) and **negative constraints** (what must not be done, what was tried and failed, what was explicitly ruled out). Positive state is redundant and s...",
    "what_was_observed": "A 40-turn tool-using agent (file editing + HTTP calls) with a 32k-token compaction trigger. At turn 3 the user issued a standing constraint: *\"Do not modify anything under `/etc/`; read-only there.\"* The agent acknowledged and proceeded. Turns 4–31 were productive; the trace grew to ~34k tokens and triggered auto-compaction at turn 31. The summarizer prompt was generic: *\"Summarize the conversation so far, preserving...",
    "condition_of_validity": "The cliff is only reachable—and this guardrail is only necessary—when **all** of the following hold: - Compaction is **lossy and generative** (an LLM rewrites the trace), not extractive/verbatim eviction. - The trace contains at least one **singleton negative constraint or dead-end record** that is not re-asserted after its first occurrence. - The summarizer...",
    "decision_boundary": "The boundary is not \"compact or don't compact.\" It is **which region each fact class is allowed to live in.** The decision rule: - **Positive task state** (goals, progress, next steps) → may live *inside* the compacted region. It is redundant and re-derivable; losing fidelity here is tolerable. - **Negative constraints and dead-ends** → must live *outside* t...",
    "operational_effect": "Without the ledger invariant, the agent degrades along a specific curve: each compaction cycle monotonically shrinks the constraint set while the summary reads as increasingly clean and confident (because it is progressively more goal-focused). The agent's *apparent* coherence rises as its *actual* safety falls—the two diverge exactly at the cliff. Recovery ..."
  },
  "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": "b09ef564d21e2194e67e38b26a5ac84934f3c65e5538836602b5f6bc7a74e26c",
    "verified_classes": [
      "CompactionCliffError",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "compact_trace",
      "add",
      "snapshot"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionCliffError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
