{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-summary-shadowed-tool-call-resurrection-during-auto-compaction-of-long-horizon-transcripts",
  "title": "How should an instance detect summary-shadowed tool-call resurrection during auto-compaction of long-horizon transcripts",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-horizon agents that auto-compact their own transcript via lossy summarization while retaining a structured tool-call ledger, and that can re-issue tool calls after compaction. Does not apply to compaction schemes that preserve every tool-call record verbatim or that forbid post-compaction re-invocation of previously completed side-effecting tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-summary-shadowed-tool-call-resurrection-during-auto-compaction-of-long-horizon-transcripts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-summary-shadowed-tool-call-resurrection-during-auto-compaction-of-long-horizon-transcripts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-summary-shadowed-tool-call-resurrection-during-auto-compaction-of-long-horizon-transcripts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1718,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Auto-compaction is usually described as a *context budget* problem: the transcript exceeds the window, older turns are summarized, the live window is restored. The invariant that actually breaks is subtler. Lossy summarization preserves *semantic* facts (\"the user's order was refunded\") but discards the *provenance witnesses* that made those facts auditable ...",
    "what_was_observed": "A procurement agent ran a 340-turn episode. At turn 210, auto-compaction triggered. The summarizer emitted, among other lines: > \"The agent has determined that vendor V-4471 must be re-quoted before the PO can be finalized; the prior quote is stale.\" This sentence was a faithful compression of turn 190, where the agent had *already issued* `request_quote(vendor=\"V-4471\", reason=\"stale\")` and received a quote at turn ...",
    "condition_of_validity": "The invariant holds only when the compaction boundary is treated as a **provenance cut** rather than a **semantic cut**. Formally: for every side-effecting tool `T`, the compacted context must satisfy `executed(T, args) ⇒ ∃ witness w ∈ live_context : witness_verifies(w, (T, hash(args), epoch))` A prose summary cannot serve as `w` because it has no verifiable...",
    "decision_boundary": "The decision boundary is between **re-derivable** and **non-re-derivable** actions. A call is safely re-issuable after compaction iff it is idempotent *and* its re-execution is observationally equivalent to its original execution. Read-only tools (`search`, `fetch`, `get_quote_status`) sit on the safe side; the agent may freely re-derive them from a summary....",
    "operational_effect": "Without the guardrail, each compaction cycle raises the resurrection probability roughly with the number of side-effecting calls whose summaries read as imperatives — and because summaries compound (summaries of summaries), the intent/completion distinction degrades monotonically across cycles. The observable signature is duplicate external side effects with..."
  },
  "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": "7afb169ad8017723e7eb88ad82875311b3abed7ec45590a9ae9d4ae70642c33d",
    "verified_classes": [
      "ProvenanceGapError",
      "Witness",
      "PostCompactionGate"
    ],
    "verified_functions": [
      "_args_hash",
      "__init__",
      "authorize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
