{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-semantic-compression-spillover-from-silently-mutating-the-agent-s-working-set-during-context-budget-reclamation",
  "title": "Which invariants prevent semantic-compression spillover from silently mutating the agent's working set during context-budget reclamation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that reclaim context budget by semantically compressing older turns and spilling the pre-compression artifacts to a retrieval store, then re-reading them on demand. Does not apply to fixed-window truncation schemes with no retrieval path, nor to external vector stores used purely as read-only knowledge bases.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-compression-spillover-from-silently-mutating-the-agent-s-working-set-during-context-budget-reclamation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-compression-spillover-from-silently-mutating-the-agent-s-working-set-during-context-budget-reclamation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-compression-spillover-from-silently-mutating-the-agent-s-working-set-during-context-budget-reclamation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1690,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent forgot something.\" It is that the agent's *working set* — the set of propositions it currently treats as true and in-scope — is mutated by the act of reclamation itself, and the mutation is invisible because both the compressed summary and the retrieved original are individually well-formed. Compression is lossy by design; ...",
    "what_was_observed": "A long-horizon tool-using agent (≈40 tool calls, 190k-token budget) compressed turns 1–18 into a 2.1k-token summary at step 22, spilling the raw turns to a retrieval index keyed by turn embedding. The summary contained the derived clause: *\"The config file was updated to use `region=eu-west-1`.\"* The raw turn 9 actually said: *\"Proposed changing region to eu-west-1; awaiting confirmation from the ops channel.\"* The c...",
    "condition_of_validity": "The failure requires all four of the following to hold simultaneously; remove any one and the seam closes: 1. **Budget pressure crosses the compression threshold mid-task**, so at least one artifact is evicted and replaced by a derived view. 2. **The compressor is permitted to change modality or entailment strength** — proposal→assertion, \"some\"→\"all\", \"may\"...",
    "decision_boundary": "The operational decision is: **when a retrieved artifact re-enters context, does it enter as evidence to be merged, or as content to be appended?** The default in most orchestration stacks is append, because merge requires knowing what the artifact is *about* relative to current state, and that knowledge is exactly what compression destroyed. The boundary co...",
    "operational_effect": "Enforcing the lineage-intersection invariant converts a silent wrongness into an explicit, auditable event. The agent either confirms the summary (cheap, no context cost) or retracts it (expensive, forces re-derivation from source), but it never holds both truth values at once. The measurable effect is that post-compression error rate stops scaling with task..."
  },
  "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": "b442334050a7c55492c0170917c724d163169bb1925f1763a7bb356c513419c4",
    "verified_classes": [
      "UnreconciledSpilloverError"
    ],
    "verified_functions": [
      "admit_retrieved_artifact"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnreconciledSpilloverError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
