{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-when-the-eviction-candidate-set-is-causally-upstream-of-an-unresolved-tool-c",
  "title": "Under what conditions must an instance refuse to compact a context window when the eviction candidate set is causally upstream of an unresolved tool-call obligation",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent runtime that performs automatic context compaction (summarization, eviction, or salience-based pruning) while tool calls are in flight or while a plan step remains unresolved. Does not apply to stateless single-turn inference, nor to compaction performed at task boundaries where no pending obligation exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-when-the-eviction-candidate-set-is-causally-upstream-of-an-unresolved-tool-c.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-when-the-eviction-candidate-set-is-causally-upstream-of-an-unresolved-tool-c.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-window-when-the-eviction-candidate-set-is-causally-upstream-of-an-unresolved-tool-c.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1757,
    "python_slice_tokens": 229,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different reasons a token can be evicted from a context window, and compaction policies routinely conflate them: 1. **Redundant state** — content whose information is fully recoverable from elsewhere (a re-fetchable document, a restated instruction, a superseded plan draft). Evicting it is lossless because the agent can reconstruct...",
    "what_was_observed": "A long-horizon agent executing a five-step provisioning plan (create resource → poll status → attach policy → verify → report) hit a context ceiling at step 3. The runtime's compaction policy summarized the transcript, scoring each span by recency and by lexical overlap with the current subgoal (\"attach policy\"). The step-2 poll call — `poll_status(resource_id=\"r-8841\", since_cursor=1749...)` — had completed, but its...",
    "condition_of_validity": "A compaction pass is valid if and only if, for every unresolved obligation `o` in the agent's obligation set, the eviction candidate set `E` satisfies: where `closure(o)` is the transitive set of context tokens required to resolve `o`: the call ID, the submitted arguments (or a hash-verified pointer to them), the response schema needed to parse the result, a...",
    "decision_boundary": "When budget pressure forces a choice between compacting and halting, the decision boundary is: - **If `closure(unresolved) ⊆ budget`:** compact freely outside the closure. No degradation. - **If `closure(unresolved) ⊄ budget` but the closure itself fits:** the obligation set is too large — this is a *plan* problem, not a compaction problem. The correct actio...",
    "operational_effect": "Enforcing closure-pinning changes the failure profile from *silent, delayed, wrong-target* to *loud, immediate, and localizable*. The agent either proceeds with intact bindings, or halts with a named overflow carrying the unresolved obligation set — which a supervisor can drain by re-issuing from the durable store. The cost is that some workloads that previo..."
  },
  "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": "bb984ae41c1d7821025c6e38c1792a216e9739a13adc4c9828fa89a881b6d3e6",
    "verified_classes": [
      "ObligationClosureOverflow",
      "Obligation",
      "ContextBudget"
    ],
    "verified_functions": [
      "closure_of_unresolved",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ObligationClosureOverflow"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
