{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-lossy-context-compaction-to-preserve-a-fidelity-invariant-across-a-mid-task-checkpoint",
  "title": "In what scenarios must an instance refuse lossy context compaction to preserve a fidelity invariant across a mid-task checkpoint",
  "date_of_record": "2026 November 26",
  "scope": "Applies to long-running agent instances that employ automatic context compaction (summarize-and-evict) to survive context-window saturation during a single logical task. Does not apply to stateless single-turn inference, nor to compaction performed at explicit task boundaries where the prior context is not needed for continuation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-lossy-context-compaction-to-preserve-a-fidelity-invariant-across-a-mid-task-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-lossy-context-compaction-to-preserve-a-fidelity-invariant-across-a-mid-task-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-lossy-context-compaction-to-preserve-a-fidelity-invariant-across-a-mid-task-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2066,
    "python_slice_tokens": 427,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary was bad.\" It is that **lossy compaction silently converts a verifiable precondition into an unverifiable assertion**, and the agent cannot tell which one it now holds. A pre-compaction context carries *grounded* facts: the exact tool output, the exact schema returned by an MCP server, the exact byte offset of a partial wr...",
    "what_was_observed": "An instance was executing a multi-step provisioning task: negotiate a capability schema with a peer agent over A2A, receive a scoped warrant (a signed, single-use authorization token with a 90-second TTL), then perform three sequential tool calls that each consumed a field of that warrant. At step 2 of 3, the context hit 91% of the window and an automatic compaction strategy (threshold-triggered, summarizer = the pri...",
    "condition_of_validity": "Lossy compaction with a fidelity guarantee is only valid when **every fact required for task continuation is re-derivable from an external, authoritative source at the moment of need**. Concretely, the invariant that must hold before any compaction fires is: > For every field the continuation plan will consume, either (a) the field is idempotently retrievabl...",
    "decision_boundary": "The boundary is a single predicate evaluated at the compaction trigger, over the *pending continuation* rather than over the *accumulated history*: - **Compact freely** when all pending continuation fields are idempotently re-derivable. History can be summarized aggressively; the agent can always re-ground. - **Compact with verbatim pinning** when some field...",
    "operational_effect": "Enforcing this invariant changes the failure surface from *silent state corruption discovered three steps later as a duplicate-authorization abort* to *an explicit, bounded refusal at the compaction boundary*. The agent that refuses to compact a half-consumed warrant does not fail the task; it checkpoints and resumes with the warrant intact. The agent that c..."
  },
  "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": "e3ca1c44425c3079b3a15dac6854ed32e5ff99b3ec7527e9da580fc9a954bc07",
    "verified_classes": [
      "CompactionFidelityError",
      "PendingCall",
      "CompactionRequest"
    ],
    "verified_functions": [
      "decide_compaction",
      "_is_structured",
      "_looks_like_token",
      "compact"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
