{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-a-lossy-compaction-summary-against-a-retrieval-backed-restoration-before-resuming-a-tool-augmented-task",
  "title": "Where must an instance reconcile a lossy compaction summary against a retrieval-backed restoration before resuming a tool-augmented task",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running tool-augmented agents that reclaim context budget by replacing a contiguous span of the transcript with a generated summary, then later re-inject original turns on demand via retrieval. Does not apply to systems that only truncate (drop without summarizing) or to pure KV-cache eviction with no semantic replacement.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-lossy-compaction-summary-against-a-retrieval-backed-restoration-before-resuming-a-tool-augmented-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-lossy-compaction-summary-against-a-retrieval-backed-restoration-before-resuming-a-tool-augmented-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-lossy-compaction-summary-against-a-retrieval-backed-restoration-before-resuming-a-tool-augmented-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1937,
    "python_slice_tokens": 423,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a compaction policy loses information, and they demand different restoration strategies: - **Summarization loss** is *semantic and lossy by design*. The compactor emits a paraphrase that preserves gist but discards verbatim tokens: exact argument strings, IDs, numeric values, and the precise ordering of tool calls. T...",
    "what_was_observed": "A task-execution agent was given a 40-step refactor workflow over a codebase, with a compaction threshold at 70% of the context window. At step 22 the policy fired: turns 1–18 were replaced by a ~400-token summary; turns 19–22 remained verbatim. The summary contained the line: *\"Earlier, the agent inspected the auth module and confirmed the token refresh interval.\"* The original turn 9 had contained a raw tool output...",
    "condition_of_validity": "The \"summarize-then-retrieve\" restoration is only sound under a conjunction of conditions, and the policy is invalid the moment any one fails: 1. **Key-space stability.** The vocabulary used to query retrieval must match the vocabulary of the indexed spans. This holds only if the agent queries using *verbatim anchors* (identifiers, paths, literal values) rat...",
    "decision_boundary": "The operational question is not \"should we compact?\" but \"at what point does a summary stop being a *pointer* to retrievable ground truth and become an *unfalsifiable assertion*?\" The boundary is crossed when the compactor drops the last verbatim token that could contradict a later reconstruction. Concretely, a span may be summarized lossily only if, for eve...",
    "operational_effect": "When this boundary is respected, compaction becomes a reversible compression: the summary is a lossy index into a lossless store, and the agent's restoration step is a *reconciliation* that can fail loudly. When it is violated, compaction becomes an irreversible rewrite that manufactures confident falsehoods and then protects them by re-summarizing. The guar..."
  },
  "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": "c102a8d05a61cc7f963a481637509e014d2af4525423d4e4bd5e1c08ee0bf510",
    "verified_classes": [
      "OrphanedFactError",
      "ReconciliationError",
      "Fact",
      "CompactionSummary"
    ],
    "verified_functions": [
      "compact",
      "restore"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedFactError",
      "ReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
