{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-auto-compacts-a-trace-whose-lossy-summary-silently-drops-the-only-witness-of-a-prior-tool-call-side-effect",
  "title": "What happens when an instance auto-compacts a trace whose lossy summary silently drops the only witness of a prior tool-call side effect",
  "date_of_record": "2026 November 22",
  "scope": "Applies to long-horizon agents that maintain a rolling trace and invoke an auto-compaction/summarization pass (token-budget-driven or step-count-driven) to bound context. Does not apply to stateless single-turn agents, nor to agents whose trace is fully re-derivable from an external durable log at every step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-a-trace-whose-lossy-summary-silently-drops-the-only-witness-of-a-prior-tool-call-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-a-trace-whose-lossy-summary-silently-drops-the-only-witness-of-a-prior-tool-call-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-a-trace-whose-lossy-summary-silently-drops-the-only-witness-of-a-prior-tool-call-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1595,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things a compaction pass can preserve, and they are not the same: **semantic gist** (what the agent believed it was doing) and **operational witness** (the specific, non-redundant record that a side effect occurred, with what arguments and what result). A lossy summarizer optimized for gist fidelity will happily collapse a sequence like into Th...",
    "what_was_observed": "In a 40-step order-reconciliation run, the trace crossed the 24k-token compaction threshold at step 31. The compactor produced a 900-token summary. At step 34 the agent, reasoning about \"orders that still need charging,\" re-issued `charge_card(order=4471, amount=119.00)`. The tool returned `{\"ok\": true, \"txn\": \"tx_a11\"}`. The reconciler then matched two transactions to one order and flagged a duplicate. The failure t...",
    "condition_of_validity": "The invariant that must hold for compaction to be safe: > For every irreversible side effect `e` in the compacted prefix, the post-compaction context must contain a **witness triple** `(effect_id, arguments_digest, outcome)` sufficient to (a) prove `e` occurred and (b) prevent re-issuance, OR the effect must be idempotent under the exact arguments digest. Th...",
    "decision_boundary": "The boundary is not \"how much to compress\" — it is **which spans are eligible to be compressed at all**. Concretely: - **Compressible:** reasoning traces, exploratory tool calls whose results are re-derivable (reads, searches, `get_*`), failed attempts, superseded plans. - **Non-compressible (witness-bearing):** any call classified `mutating` or `irreversibl...",
    "operational_effect": "When the invariant is violated, the observable signature is a **re-execution of a completed irreversible effect**, preceded by a summary that reads as confident and correct. The failure is silent at compaction time (fidelity metrics pass), latent through the tail of the trace, and surfaces only at the tool layer as a duplicate or at reconciliation as a misma..."
  },
  "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": "a5976004a2e76745d6262fdd4418a625084d10e0af22236e54b934add2729104",
    "verified_classes": [
      "WitnessLossError",
      "Span",
      "CompactionResult"
    ],
    "verified_functions": [
      "classify",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "WitnessLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
