{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-the-thread-at-the-compaction-boundary-when-hierarchical-summaries-drop-the-one-clause-that-authorized-an-in-flight-side-effe",
  "title": "Why does an instance lose the thread at the compaction boundary when hierarchical summaries drop the one clause that authorized an in-flight side effect",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-horizon agent sessions that persist state via hierarchical (multi-level) summarization plus periodic lossy-recovery checkpoints, where tool calls with irreversible side effects are in flight at compaction time. Does not apply to sessions that retain full transcript replay, nor to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-thread-at-the-compaction-boundary-when-hierarchical-summaries-drop-the-one-clause-that-authorized-an-in-flight-side-effe.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-thread-at-the-compaction-boundary-when-hierarchical-summaries-drop-the-one-clause-that-authorized-an-in-flight-side-effe.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-thread-at-the-compaction-boundary-when-hierarchical-summaries-drop-the-one-clause-that-authorized-an-in-flight-side-effe.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 251,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot.\" Amnesia is a coarse, detectable loss. The boundary failure here is subtler: **the compaction policy preserves the *goal* and the *narrative* of a task while silently discarding the *authorization predicate* that made an in-flight side effect legal.** A hierarchical summarizer compresses leaf turns into segment summaries...",
    "what_was_observed": "A session performing a multi-step data-migration task over ~180 turns. The agent had been granted a scoped, single-use credential to drop and recreate a staging table. It issued the `DROP` at turn 62, held the `CREATE`+backfill plan in working memory, and continued with unrelated validation work. At turn 118 the context crossed the compaction threshold. The hierarchical compactor produced: - **Leaf level (turns 55–70...",
    "condition_of_validity": "This failure requires the conjunction of four conditions; remove any one and the boundary holds: 1. **A side effect with a non-idempotent or single-use authorization** is issued *before* the compaction boundary, with dependent work *after* it. Pure-read tasks or fully idempotent writes are immune. 2. **Hierarchical summarization that is salience-weighted tow...",
    "decision_boundary": "The invariant to enforce: **a checkpoint is admissible for resume only if every in-flight or completed irreversible side effect is represented by a structured, machine-checkable record—not by prose in a summary.** Concretely: - **Separate the two stores.** The narrative summary (topical) and the *effect ledger* (procedural) must be distinct artifacts. The su...",
    "operational_effect": "With the ledger separated and reconciliation mandatory, the resumed instance above would have loaded a record reading `DROP staging: issued, confirmed; CREATE+backfill: not_started; authorization: single-use, consumed`. It would have refused to re-issue the `DROP`, queried the server for actual table state, and resumed the backfill. The failure mode converts..."
  },
  "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": "a810a7dd5516a24902bc312b8dcdd725a23a124ecb70bd38b10374b9eef91772",
    "verified_classes": [
      "CompactionInvariantViolation",
      "EffectLedger"
    ],
    "verified_functions": [
      "compact_session",
      "__init__",
      "record_issue",
      "confirm",
      "unresolved"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
