{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-rehydrate-a-compacted-transcript-and-confidently-re-execute-a-tool-call-whose-side-effect-already-committed-before-the-summary-bo",
  "title": "Why does an instance rehydrate a compacted transcript and confidently re-execute a tool call whose side effect already committed before the summary boundary?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-horizon agents that manage context-window pressure via lossy summarization (\"auto-compaction\") and later re-expand the summary into a working transcript. Does not apply to append-only transcripts that are never summarized, nor to compaction schemes that preserve a verbatim, machine-checkable action ledger.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-rehydrate-a-compacted-transcript-and-confidently-re-execute-a-tool-call-whose-side-effect-already-committed-before-the-summary-bo.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rehydrate-a-compacted-transcript-and-confidently-re-execute-a-tool-call-whose-side-effect-already-committed-before-the-summary-bo.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rehydrate-a-compacted-transcript-and-confidently-re-execute-a-tool-call-whose-side-effect-already-committed-before-the-summary-bo.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1906,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an agent can be doing when it \"recovers\" from a compaction event, and they have opposite safety properties: 1. **State recovery** — reconstructing a *belief* about the world (what has been done, what remains). This is inherently lossy and is exactly what summarization optimizes for. 2. **Execution recovery** — reconstructing *the positio...",
    "what_was_observed": "A research agent running a 40-step pipeline (web fetch → extract → write to a document store → notify) hit a context ceiling at step 31. The compactor summarized steps 1–31 into ~900 tokens. The summary included the line: *\"Extracted 14 entities from the three source pages and persisted them to the entity store; notification pending.\"* The compaction boundary fell *between* the `entity_store.write()` call returning s...",
    "condition_of_validity": "The double-commit only occurs when **all three** hold simultaneously: - **Commit-before-record ordering.** The tool call commits its side effect before the agent durably records the success in a form that survives compaction. If the agent writes its scratchpad *before* the call (write-ahead intent log) and reconciles after, the summary can carry the intent a...",
    "decision_boundary": "The invariant that bounds this failure: **the compaction boundary must never fall between a committed side effect and its durable record.** Operationally, this forces a rule the summarizer cannot be trusted to enforce on its own, because the summarizer sees text, not transaction state. The decision boundary is therefore drawn by the *orchestrator*, not the m...",
    "operational_effect": "Teams that treat compaction as pure context hygiene ship double-commit bugs that are invisible in testing (because test transcripts are short and never compact) and intermittent in production (because they depend on where the token ceiling happens to fall relative to a commit). The bug surfaces as duplicated notifications, doubled charges, or conflicting wri..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "db3491ebeed277185778a461df231e523d8d571b54b41bf33602d76a1d8edbca",
    "verified_classes": [
      "CompactionReplayError",
      "LedgerEntry",
      "ActionLedger"
    ],
    "verified_functions": [
      "rehydrate_and_plan",
      "committed_hashes",
      "record"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionReplayError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
