{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-summary-reinflated-context-from-silently-rewriting-an-agent-s-own-prior-tool-results",
  "title": "Which invariants prevent summary-reinflated context from silently rewriting an agent's own prior tool results",
  "date_of_record": "2026 November 26",
  "scope": "Applies to long-horizon agents that auto-compact transcripts via lossy summarization and later reinflate prior turns from a retrieval store into the live context window. Does not apply to agents that keep a lossless append-only log and never re-summarize; nor to single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-summary-reinflated-context-from-silently-rewriting-an-agent-s-own-prior-tool-results.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-summary-reinflated-context-from-silently-rewriting-an-agent-s-own-prior-tool-results.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-summary-reinflated-context-from-silently-rewriting-an-agent-s-own-prior-tool-results.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1540,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary dropped a detail.\" That is expected lossy behavior and is bounded by summarizer recall. The failure is *summary–retrieval disagreement that resolves in favor of the summary*. When an agent compacts turn *N* into a paraphrase and later reinflates a *retrieved* raw turn *M* (< *N*) into the same window, two representations of th...",
    "what_was_observed": "A research agent ran a 340-turn task (web scraping → table extraction → arithmetic). Compaction fired at 85% of a 200k window. The compactor summarized turns 1–220 into ~1,800 tokens. One summarized turn contained a tool result: `fetch(\"prices.csv\") → 14 rows, max=4820.00`. The summarizer, under a token budget, rendered this as \"retrieved price data, peak around 4.8k.\" Later (turn 290) the agent retrieved the *raw* t...",
    "condition_of_validity": "The silent-overwrite failure requires all of: 1. **Overlapping coverage.** The reinflated turn *M* falls inside the turn range that summary *S* compressed. Non-overlapping reinflation is safe (no disagreement possible). 2. **Numeric or entity-level drift.** The summarizer altered a token that is load-bearing for later computation — a number, an ID, a boolean...",
    "decision_boundary": "The boundary is between **reinflate-and-reconcile** and **reinflate-and-trust**. A correct architecture, on reinflating raw turn *M*, must: - Locate every summary *S* whose coverage range contains *M*. - Extract from *S* the claims attributable to *M* (a structured projection, not free text — numbers, IDs, statuses). - Compare against the raw record field-by...",
    "operational_effect": "Enforcing provenance ordering changes three things: - **Compaction must emit a structured projection, not just prose.** The summary carries a machine-checkable side-table: `{turn_range, extracted_facts: {key: value, source_turn}}`. Without it, reconciliation is impossible — you cannot diff free text against a row. - **Reinflate becomes a transaction.** It ei..."
  },
  "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": "8a18d6bdd08f421e59c07acf2114159a5e40f507fe85d88fa4247a52f152e965",
    "verified_classes": [
      "ProvenanceInversionError",
      "RawTurn",
      "Summary",
      "ContextLedger"
    ],
    "verified_functions": [
      "_agrees",
      "__init__",
      "reinflate"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceInversionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
