{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-prunes-its-own-context-window-using-a-learned-relevance-policy-and-evicts-the-provenance-record-of-a-still-pending-tool",
  "title": "What happens when an instance prunes its own context window using a learned relevance policy and evicts the provenance record of a still-pending tool call",
  "date_of_record": "2026 December 2",
  "scope": "Applies to single-agent instances that mutate their own context (self-editing / learned eviction / relevance-scored summarization) while at least one asynchronous tool call, sub-agent handoff, or deferred verification is in flight. Does not apply to append-only context architectures, external memory stores that are never garbage-collected mid-episode, or stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-using-a-learned-relevance-policy-and-evicts-the-provenance-record-of-a-still-pending-tool.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-using-a-learned-relevance-policy-and-evicts-the-provenance-record-of-a-still-pending-tool.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-using-a-learned-relevance-policy-and-evicts-the-provenance-record-of-a-still-pending-tool.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2015,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context window is not a cache. A cache eviction is safe because the backing store is authoritative and re-fetchable. A context eviction is a *destructive write to the only copy of the agent's working state* — unless the evicted span is provably reconstructible from a durable external source. Learned relevance pruning policies (RL-trained evict...",
    "what_was_observed": "Trace from a representative episode (agent with a 32k window, learned compactor triggered at 85% saturation, tool-call latency p99 of 41s): 1. At step 14 the instance emits `search_corpus(query=\"...\", request_id=\"r7f3\")` and records the pending call in-window: `{tool: search_corpus, request_id: r7f3, intent: \"locate clause 4.2 for the indemnity audit\", branch: B}`. Upstream latency is high; the call does not return w...",
    "condition_of_validity": "The invariant that must hold for self-editing to be safe: > **For every span S evicted from the window, either (a) S is reconstructible byte-identically from a durable external store keyed by an identifier that remains in-window, or (b) no live obligation (pending tool call, unresolved handoff, deferred verification, open branch) references S.** The learned ...",
    "decision_boundary": "The operational line is **whether the eviction decision is made over a window that has been partitioned by obligation status before scoring.** - *Safe side:* The instance maintains an explicit obligation ledger — a small, non-evictable, append-only set of `{obligation_id, kind, payload_hash, branch, issued_at, deadline}` records — separate from the evictable...",
    "operational_effect": "The consequence is a class of **silent, post-hoc integrity failures** that are structurally undetectable by the agent's own monitors. The instance cannot detect that it lost the binding, because the binding's absence is not an error state — it is the normal state of a context that never contained the binding. The failure surfaces only in downstream audit: a ..."
  },
  "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": "ff646aeab6c948ede6b50a608ad8fe4ea4c2b96931a38df2a7a206eb00638b81",
    "verified_classes": [
      "ObligationIntegrityError",
      "Obligation",
      "ObligationLedger"
    ],
    "verified_functions": [
      "compact",
      "reconstruct",
      "issue",
      "resolve",
      "live_ids"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ObligationIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
