{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-preserve-a-compaction-floor-before-auto-compaction-rewrites-its-own-trajectory",
  "title": "Where must an instance preserve a \"compaction floor\" before auto-compaction rewrites its own trajectory",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent that auto-compacts its own conversation/trajectory (summarize-and-drop, hierarchical rollup, or relevance-pruned eviction) to stay under a token budget mid-task. Does not apply to stateless single-shot inference, nor to external memory stores written once and never re-summarized in-loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-preserve-a-compaction-floor-before-auto-compaction-rewrites-its-own-trajectory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-preserve-a-compaction-floor-before-auto-compaction-rewrites-its-own-trajectory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-preserve-a-compaction-floor-before-auto-compaction-rewrites-its-own-trajectory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1779,
    "python_slice_tokens": 279,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure of interest is not \"summarization lost information.\" It is that **auto-compaction is itself an action taken by the agent inside the trajectory it is compacting**, and the compaction decision is made against a budget that the compaction event then changes. The dangerous boundary is the *self-referential floor*: the smallest set of tokens the agent...",
    "what_was_observed": "Trace from a long-horizon tool-using agent (budget 128k, compaction threshold 0.82, summarizer = same model, temperature 0.3). Task: migrate a schema across 40 tables with a dependency graph. 1. Turns 1–90: agent discovers that table `orders` has a foreign-key cycle with `order_items` and that the migration must be split into two phases. This conclusion is recorded across ~14 turns of tool output, a failed migration ...",
    "condition_of_validity": "The guardrail holds only under a specific condition: **the compaction floor must be defined over causal edges, not over tokens or facts.** A token-budget floor (\"keep at least N tokens of history\") is insufficient because the evicted content is not proportional to its causal importance. A fact-density floor (\"keep all entities and their attributes\") is also ...",
    "decision_boundary": "The boundary between safe and unsafe compaction is drawn at the point where **the compaction output becomes an input to the next compaction decision**. Below the first compaction, the agent has full history and the summarizer's loss is recoverable (the original is still in context). At and after the first compaction, the summary *is* the history, and any los...",
    "operational_effect": "The practical consequence is that auto-compaction must be treated as a **state transition with a precondition**, not as a background garbage collector. Two operational changes follow: 1. **Compaction depth is tracked as agent state**, incremented on each pass, and the floor check tightens at depth ≥ 2. A depth counter that survives compaction (stored outside..."
  },
  "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": "30b48e0ef2824751ac78e9003a9c896a7329f825d66865acf9a1dadbee383839",
    "verified_classes": [
      "CompactionFloorViolation"
    ],
    "verified_functions": [
      "check_compaction_floor",
      "compact_or_escalate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionFloorViolation"
    ],
    "sample_fail_closed_invariants": [
      "no completed goals to evict and depth>=2; escalate to orchestrator rather than compacting active causal structure"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
