{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-prunes-its-own-context-before-the-summarizer-has-observed-the-pruned-region",
  "title": "What happens when an instance prunes its own context before the summarizer has observed the pruned region",
  "date_of_record": "2026 November 18",
  "scope": "Applies to any runtime that rewrites or prunes its own prompt context (sliding-window eviction, tool-output truncation, message collapse, RAG re-ranking) and relies on a summarizer or compactor to preserve semantic continuity. Does not apply to append-only contexts, nor to external supervisors that hold an unpruned copy of the full transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-before-the-summarizer-has-observed-the-pruned-region.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-before-the-summarizer-has-observed-the-pruned-region.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-before-the-summarizer-has-observed-the-pruned-region.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1363,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"lost context.\" Lost context is expected and accounted for. The failure is **asymmetric observation of the pruned region**: the pruner and the summarizer are two distinct consumers of the same token stream, and the pruner operates on a schedule (token budget, turn count, latency deadline) that is not synchronized with the summarizer's obse...",
    "what_was_observed": "In a long-running agent loop with a 32k window, a 24k prune threshold, and an asynchronous compactor with a 300ms deadline: 1. A tool returned a 9k-token error trace at turn N. The compactor was scheduled but its deadline expired and it was re-queued for turn N+1. 2. At turn N+1, the pruner fired first (budget crossed 24k), evicting the oldest 8k tokens — which included the head of the error trace. 3. The compactor t...",
    "condition_of_validity": "This boundary holds only when all three of the following are true: - **Two consumers, one stream.** The pruner and the summarizer read the same mutable buffer rather than the summarizer reading a stable snapshot or an append-only log. - **Independent schedules.** Prune triggers are budget- or latency-driven; compaction triggers are queue- or deadline-driven....",
    "decision_boundary": "When the prune threshold is approached, the runtime must choose between two orderings, and the choice is not symmetric: - **Prune-then-summarize** is only safe if the summarizer's output is tagged with the exact span set it observed and downstream consumers treat unobserved spans as *unknown*, not *absent*. - **Summarize-then-prune** is safe unconditionally,...",
    "operational_effect": "A runtime that gets this wrong exhibits a characteristic signature: **monotonically degrading summaries with no error signal.** Each compaction cycle can drop a span the previous summary depended on, so summaries drift toward the generic. The agent's behavior becomes plausible but ungrounded — it references decisions it can no longer cite and re-derives fact..."
  },
  "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": "61e2bbe360b58f7c65acb783ed989457c968789e53627b6bea3fecdc119385c0",
    "verified_classes": [
      "UnobservedPruneError",
      "Span",
      "CompactionUnit"
    ],
    "verified_functions": [
      "prune",
      "overlaps",
      "covers"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnobservedPruneError"
    ],
    "sample_fail_closed_invariants": [
      "assert new_len == 16000"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
