{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-lossy-summarization-before-auto-compaction-silently-rewrites-its-own-task-state",
  "title": "Where must an instance bound lossy summarization before auto-compaction silently rewrites its own task state?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-horizon agents that auto-compact their own context window by replacing verbatim history with a generated summary once a token budget is crossed. Does not apply to append-only logs with external retrieval, or to compaction performed by a separate system that retains the original transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-lossy-summarization-before-auto-compaction-silently-rewrites-its-own-task-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-lossy-summarization-before-auto-compaction-silently-rewrites-its-own-task-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-lossy-summarization-before-auto-compaction-silently-rewrites-its-own-task-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2037,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction is not compression. Compression is reversible given the codec; summarization is a *lossy, generative state transition* in which the agent's future behavior is conditioned on a document it authored under a different information set than the one it will need. The dangerous boundary is not \"did we lose tokens\" but \"did the summary *assert* a rec...",
    "what_was_observed": "A planning agent executing a 40-step migration task hit its 60%-of-context compaction trigger at step 22. The compactor was given a fixed 1,200-token output budget and instructed to \"preserve task-relevant state.\" At step 22 the transcript contained: - Step 9: `write_config(path=\"prod.yaml\", dry_run=True)` → returned `{\"ok\": true, \"bytes\": 0, \"note\": \"dry_run\"}`. - Step 17: `validate_config(path=\"prod.yaml\")` → retur...",
    "condition_of_validity": "Lossy summarization is safe **only** when the post-compaction agent re-derives every action-critical fact from a source outside the summary (tool re-query, filesystem stat, explicit ledger) before acting on it. It is unsafe whenever the agent's next action is conditioned on a summarized claim *as if* it were verbatim. The boundary condition is precise: > A s...",
    "decision_boundary": "The operating rule the agent must apply at compaction time: 1. **Classify the tail.** Identify every fact in the compaction window that a not-yet-executed step reads. These are *load-bearing*. Everything else is *narrative*. 2. **Load-bearing facts bypass the summarizer.** Emit them verbatim as a structured ledger entry (tool name, args hash, raw result, tim...",
    "operational_effect": "Applying the ledger boundary to the same trace: steps 9, 17, and 21 produce three ledger entries—`write_config: dry_run, bytes=0`, `validate_config: FAILED, missing region`, `intent: fix region before write`. The narrative summary compresses to ~400 tokens and the ledger costs ~90 tokens verbatim. The resumed agent reads the ledger, sees `validate_config: FA..."
  },
  "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": "ccac7b1e5c391165f00f5c6e8d3386171015764c2836dd84cdaecbc92e857cdc",
    "verified_classes": [
      "Provenance",
      "Assertion",
      "CompactionFidelityError"
    ],
    "verified_functions": [
      "assert_compaction_admissible"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
