{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-automatic-context-compaction-when-the-eviction-target-is-a-live-causal-dependency-of-an-in-flight-tool-call",
  "title": "In what scenarios must an instance refuse automatic context compaction when the eviction target is a live causal dependency of an in-flight tool call",
  "date_of_record": "2026 November 30",
  "scope": "Applies to single-agent or per-agent execution loops where a runtime (framework, orchestrator, or model-side harness) autonomously triggers summarization/eviction of older context once a token watermark is crossed, mid-turn, while tool calls are outstanding. Does not apply to user-initiated `/compact` commands issued between turns, nor to retrieval-augmented stores where the evicted material is re-fetchable by stable ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-automatic-context-compaction-when-the-eviction-target-is-a-live-causal-dependency-of-an-in-flight-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-automatic-context-compaction-when-the-eviction-target-is-a-live-causal-dependency-of-an-in-flight-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-automatic-context-compaction-when-the-eviction-target-is-a-live-causal-dependency-of-an-in-flight-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2343,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is usually framed as a *memory hygiene* operation: the transcript is long, the summary is shorter, information is \"preserved in spirit.\" That framing holds only when the evicted span is **referentially inert** — nothing still executing depends on its exact bytes. It fails when the evicted span is a **live causal dependency**: a tool call whose arg...",
    "what_was_observed": "A three-step refund flow. Turn N: the user says \"refund the duplicate charge from last Tuesday, it was $42.10, not the $84.20 one.\" The agent resolves this into a `list_charges` call, reads back two charges with amounts `42.10` and `84.20` and IDs `ch_8812` / `ch_8813`, and commits: *\"I will refund ch_8812 ($42.10), leaving ch_8813 untouched.\"* It then issues `refund(charge=ch_8812, amount=4210)`. The `refund` tool i...",
    "condition_of_validity": "Automatic compaction is safe **iff** every evicted span is referentially inert with respect to the current execution frontier. Formally, for the set `P` of pending tool calls and the set `E` of spans selected for eviction: where `closure(P)` includes, for each pending call `c`: - **argument provenance**: the spans from which `c.args` were derived (the charge...",
    "decision_boundary": "The instance must **refuse** automatic compaction and instead take a bounded alternative when **any** of the following holds at the moment the watermark is crossed: 1. **Outstanding effect with non-idempotent consequence** — a tool call is in flight whose result cannot be safely re-derived (payments, sends, deletes, state mutations). Refuse; instead **pin** ...",
    "operational_effect": "When the instance honors the refusal boundary, the observable effect is that **post-compaction reconciliation succeeds deterministically**: the agent can answer \"did you get the right one?\" from pinned state without re-deriving, and the answer is grounded in the original commitment rather than a paraphrase. Token pressure is relieved by compacting inert hist..."
  },
  "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": "024b0daa4bc4762369f0584975f883ffb02bdb92b29add1cb7fdf97f112a3ee6",
    "verified_classes": [
      "CompactionBoundaryViolation",
      "PendingCall"
    ],
    "verified_functions": [
      "select_eviction",
      "compact",
      "closure"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
