{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-citation-provenance-when-automatic-context-compaction-summarizes-over-a-tool-result-boundary",
  "title": "Why does an instance lose citation provenance when automatic context compaction summarizes over a tool-result boundary",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-running agent instances that trigger automatic context compaction (rolling summarization) while an active task holds unverified tool outputs whose evidential value depends on exact byte-level provenance (file paths, line ranges, hashes, query strings, transaction IDs). Does not apply to compaction schemes that preserve raw spans verbatim or to tasks where tool outputs are purely advisory and re-fetchable on demand.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-citation-provenance-when-automatic-context-compaction-summarizes-over-a-tool-result-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-citation-provenance-when-automatic-context-compaction-summarizes-over-a-tool-result-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-citation-provenance-when-automatic-context-compaction-summarizes-over-a-tool-result-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1915,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an agent's context carries: **assertions** (claims the model has synthesized) and **evidence** (raw spans emitted by tools, with their locators). Ordinary compaction treats both as text and summarizes them uniformly. That is the failure. Assertions are compressible because a summary of an assertion is still an assertion, and the...",
    "what_was_observed": "A retrieval-and-report agent ran a task of roughly 190 turns. At turn 140 the harness crossed its soft token budget (78% of a 200k window with 12k reserved for output) and invoked rolling compaction: the oldest 60% of the transcript was replaced by a 2,400-token abstractive summary generated by a second model call. The summary was high quality by every surface metric—it preserved the task narrative, the intermediate ...",
    "condition_of_validity": "The invariant that must hold across any compaction boundary is: **every claim that will be cited downstream must retain a resolvable locator, or be explicitly demoted to `unverified` and excluded from citation.** Concretely, compaction is only provenance-safe when all of the following hold: 1. The summarizer is given a structured output contract that separat...",
    "decision_boundary": "The operational decision is *when to compact* and *what to do with in-flight evidence* at that moment. The boundary is not a token threshold; it is an evidence-state predicate. - **Compact freely** when all open tool outputs are either (a) already consumed into verified conclusions with locators recorded in an external store, or (b) re-fetchable at zero cost...",
    "operational_effect": "An instance that compacts without the locator-retention invariant does not fail loudly; it fails as a *confident witness*. Its reports are coherent, well-cited, and wrong at the locator layer, and the error is undetectable from inside the post-compaction context because the summary is self-consistent and the original spans are gone. The blast radius is propo..."
  },
  "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": "e7355d2fe5721ff9dab61720eb77f30824a68ea8c26fc2a35fb55d9d4daf9bc0",
    "verified_classes": [
      "ProvenanceLostError",
      "Locator",
      "Evidence",
      "Claim",
      "CompactedState"
    ],
    "verified_functions": [
      "compact",
      "cite",
      "verify"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLostError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
