{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-context-compaction-from-corrupting-recall-precision-across-a-resumed-agent-task",
  "title": "Which invariants prevent silent context-compaction from corrupting recall precision across a resumed agent task",
  "date_of_record": "2026 December 4",
  "scope": "Applies to long-running single-agent tasks that persist state across turns and resume after a context-window compaction event (summarization, truncation, or eviction). Does not apply to stateless single-shot inference or to agents whose working set always fits within one un-compacted window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-context-compaction-from-corrupting-recall-precision-across-a-resumed-agent-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-context-compaction-from-corrupting-recall-precision-across-a-resumed-agent-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-context-compaction-from-corrupting-recall-precision-across-a-resumed-agent-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1524,
    "python_slice_tokens": 251,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" It is that the agent *cannot observe that it forgot something*, and therefore continues to reason as if its recall set is intact. A compaction event is a state transition that changes the fidelity of the agent's memory without changing any externally visible signal the agent can read. The distinction that matt...",
    "what_was_observed": "A task agent was executing a multi-step migration across 41 turns. At turn 22 the runtime crossed its soft context threshold and triggered a summarization compaction: the oldest ~60% of the transcript was replaced by a model-generated digest, and a `compaction` event was appended to the trace but not surfaced to the model's own context. The digest preserved the *narrative* of prior steps but collapsed several exact v...",
    "condition_of_validity": "This failure is bounded by three conditions, all of which must hold for silent precision loss to corrupt execution: 1. The compacted content contained **exact literals** (paths, identifiers, numeric bounds, hashes) rather than purely semantic conclusions. Summarizers preserve conclusions and destroy literals preferentially. 2. The agent does **not re-verify ...",
    "decision_boundary": "The operational decision is where to place the verification boundary relative to the compaction boundary. - **Below the boundary (unsafe):** Agent treats compacted context as authoritative for literals. Correct only when the task has no side-effecting literal use after the first compaction. Rarely true for migration, refactor, or infrastructure tasks. - **At...",
    "operational_effect": "When the invariant holds, compaction becomes a pure *coverage* operation: the agent loses breadth (older reasoning) but never loses *precision* on the literals it acts upon, because those literals are never resident in the compactable region — they are fetched on demand from a store that compaction cannot touch. Recall precision becomes independent of window..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "d8648c3aadf353718a9401da79452f434f358317ed69fea7204aa227cc4dba90",
    "verified_classes": [
      "SilentCompactionCorruption",
      "DurableStore",
      "CompactionTrace"
    ],
    "verified_functions": [
      "act_on_literal",
      "put",
      "fetch",
      "record_compaction"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SilentCompactionCorruption"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
