{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-irreversible-transform-and-refuse-to-resume-a-long-horizon-task-from-a-summary",
  "title": "Under what conditions must an instance treat auto-compaction as a lossy irreversible transform and refuse to resume a long-horizon task from a summary that no longer carries a verifiable provenance chain?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that auto-compacts its own context window (summarize-then-drop) mid-task and later resumes from the compacted state. Does not apply to stateless single-turn calls or to agents whose compaction is externally checkpointed and replayable at the token level.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-irreversible-transform-and-refuse-to-resume-a-long-horizon-task-from-a-summary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-irreversible-transform-and-refuse-to-resume-a-long-horizon-task-from-a-summary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-auto-compaction-as-a-lossy-irreversible-transform-and-refuse-to-resume-a-long-horizon-task-from-a-summary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1732,
    "python_slice_tokens": 236,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two physically different things an agent can call \"compaction,\" and conflating them is the root of the failure: 1. **Reversible compaction** — the full token history is persisted out-of-band (to a store, a file, a checkpoint), and the in-context summary is a *cache* with a pointer back to the authoritative source. The summary can be wrong; the agen...",
    "what_was_observed": "A long-horizon agent (≈140 turns) executing a multi-file migration task with a rolling summarizer configured to fire at 80% of an 8k-token window. At turn 61 the summarizer compressed turns 1–40 into a ~600-token paragraph. The paragraph preserved *narrative* (what the agent was doing) but silently dropped: - The exact numeric constraint stated by the user at turn 7 (\"column `legacy_id` must remain, do not drop it — ...",
    "condition_of_validity": "An irreversible summary is a *valid* resume point if and only if all of the following hold: 1. **Constraint closure**: every hard constraint introduced before the compaction boundary is present, verbatim or in a machine-checkable form, in the summary or in an attached structured sidecar (not paraphrased into narrative). 2. **Provenance pointer**: the summary...",
    "decision_boundary": "The boundary is not \"context is full\" — it is **\"does the pending work depend on facts the summarizer is not contractually required to preserve?\"** - *Compact irreversibly* when the evicted span is purely narrative (exploration that produced no binding decision, no constraint, no failure evidence) and the agent has a durable external record of decisions. - *...",
    "operational_effect": "The invariant to enforce: **no irreversible compaction may execute unless a structured extraction pass has first emitted a constraint set and failure ledger, and the resume path can re-read them.** Concretely: - Compaction becomes a two-phase operation: `extract → verify_nonempty → summarize → drop`. If extraction yields no constraints for a span that contai..."
  },
  "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": "85bbd4614f4f4c7b2604a398801d3e9ec9e7ad5e222599a51cc839cc2215d5ed",
    "verified_classes": [
      "LossyCompactionResumeError"
    ],
    "verified_functions": [
      "compact_and_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "LossyCompactionResumeError"
    ],
    "sample_fail_closed_invariants": [
      "compaction rejected: span contained binding constraints but extraction produced an empty constraint set; refusing to dro",
      "compaction rejected: span contained tool failures but no failure ledger was extracted; resumed agent would re-walk known",
      "resume aborted: lossy state has no constraint sidecar to re-read"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
