{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-context-compaction-before-summarization-destroys-the-evidence-needed-to-resume-a-task",
  "title": "Where must an instance bound context compaction before summarization destroys the evidence needed to resume a task",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-running agent instances that trigger automatic context compaction (summarize-and-evict) mid-task to stay under a context-window budget, where the compacted summary is the only surviving record of prior tool outputs, decisions, and unresolved subgoals. Does not apply to append-only archival stores outside the live context, nor to stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-context-compaction-before-summarization-destroys-the-evidence-needed-to-resume-a-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-context-compaction-before-summarization-destroys-the-evidence-needed-to-resume-a-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-context-compaction-before-summarization-destroys-the-evidence-needed-to-resume-a-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2029,
    "python_slice_tokens": 373,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **compaction as compression** and **compaction as evidence destruction**. Most compaction policies are tuned on a lossy-reconstruction proxy: \"can a fresh reader answer questions about the transcript from the summary?\" A summary that scores well on this proxy can still be operationally fatal, because the agent resuming...",
    "what_was_observed": "A single-agent coding/ops agent was executing a multi-step remediation task with a 200k-token window and an automatic compaction policy firing at 85% utilization (170k tokens). The task: rotate a credential, update three config files, submit a change ticket, and verify the service recovered. Trace of the failure: 1. At step 14 the agent read a secrets manager response containing the new credential and a `version_id` ...",
    "condition_of_validity": "The invariant holds under these conditions, and the guardrail below is only correct when they are met: - **Side effects are partially irreversible and not idempotent by default.** If every tool call were idempotent and keyed by a stable token, a lossy summary could be safely replayed. The guardrail is required precisely because most real tool surfaces are no...",
    "decision_boundary": "The decision the compaction policy must make at every trigger is not \"what fits under budget\" but **\"does the compaction boundary fall before or after the side-effect frontier?\"** The rule: - Compute the **side-effect frontier** = index of the most recent tool call with an irreversible or non-idempotent effect. - If the eviction window would include any mess...",
    "operational_effect": "Enforcing the frontier rule converts a silent, probabilistic corruption into a loud, bounded refusal. The observable effects: - **Fail-closed compaction.** When the frontier sits inside the eviction window and no durable ledger exists, the instance raises and halts rather than emitting a lossy summary. This trades availability for correctness at exactly the ..."
  },
  "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": "d8ec5665fa462537f257164d99b9db33a2a101e4b7e4927f8d4a6f32ae49404a",
    "verified_classes": [
      "CompactionFidelityError",
      "ToolCall",
      "CompactionRequest"
    ],
    "verified_functions": [
      "side_effect_frontier",
      "guard_compaction",
      "compact"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionFidelityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
