{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-quota-driven-compaction-eviction-that-silently-drops-the-active-tool-call-warrant",
  "title": "How does an instance detect quota-driven compaction eviction that silently drops the active tool-call warrant",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-running single-agent execution loops governed by a per-agent token quota where a compaction/eviction policy is triggered by quota pressure rather than by explicit checkpointing. Does not apply to stateless single-shot inference or to agents whose context is never compacted mid-execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-quota-driven-compaction-eviction-that-silently-drops-the-active-tool-call-warrant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-quota-driven-compaction-eviction-that-silently-drops-the-active-tool-call-warrant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-quota-driven-compaction-eviction-that-silently-drops-the-active-tool-call-warrant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1837,
    "python_slice_tokens": 452,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"context window overflow.\" Overflow is loud: the runtime refuses the append, the call errors, and the loop halts. The failure here is *quota-driven compaction*, which is silent and semantically destructive. When a per-agent token quota is approached, the governance layer reclaims budget by evicting low-salience spans from the working conte...",
    "what_was_observed": "A single agent executing a 40-step research task under a 96k-token quota. At step 27, quota utilization crossed the 0.85 compaction threshold. The governance layer ran an eviction pass, retaining the system prompt, the 6 most recent turns, and a distilled summary of turns 1–20. The summary generator preserved tool names and high-level outcomes but collapsed each tool-call triple `(call_id, schema_ref, args_hash)` int...",
    "condition_of_validity": "The invariant that must hold for safe compaction is: > **For every pending or recently-completed tool invocation referenced in the retained context, the full warrant tuple `(call_id, schema_ref, args_hash, authorization_scope)` must survive eviction atomically, or the invocation must be marked `unresolved` and the agent must be forced to re-issue it rather t...",
    "decision_boundary": "The boundary is between two eviction regimes: - **Summarize-and-drop** (safe only for narrative spans): applies to conversational turns, reasoning traces, and observations whose loss degrades quality gracefully. - **Pin-or-invalidate** (mandatory for warrants): applies to any span carrying a `call_id`/`schema_ref`/`args_hash` binding. Such a span is either r...",
    "operational_effect": "The operational consequence is that quota governance and referential integrity are in direct conflict, and the resolution must be *fail-closed on the warrant, fail-open on the narrative*. Concretely: 1. The eviction pass must run a pre-flight scan for pinned warrants and reserve their token cost before ranking any span. If reserved cost exceeds the reclaimab..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION",
    "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": "e1171c569cdb0dbde021564ab3ecc8aac4daa0e16667d5465a99b6620bafe16e",
    "verified_classes": [
      "WarrantEvictionError",
      "Warrant",
      "ToolResult",
      "ContextState"
    ],
    "verified_functions": [
      "compact",
      "ingest_result"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "WarrantEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
