{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-model-driven-context-pruning-against-a-monotonic-evidence-invariant-before-committing-a-tool-action",
  "title": "Where must an instance reconcile model-driven context pruning against a monotonic evidence invariant before committing a tool action?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent loop that mutates its own context window via LLM-directed pruning, summarization, or relevance scoring under a fixed token budget, and then acts (tool call, commit, handoff). Does not apply to append-only contexts or to external retrieval systems that never re-score in-place.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-model-driven-context-pruning-against-a-monotonic-evidence-invariant-before-committing-a-tool-action.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-model-driven-context-pruning-against-a-monotonic-evidence-invariant-before-committing-a-tool-action.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-model-driven-context-pruning-against-a-monotonic-evidence-invariant-before-committing-a-tool-action.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1566,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context window is not a lossy cache; it is the agent's working *evidence base*. The distinction that matters is between **relevance** (a probabilistic score assigned to a span by the model) and **evidentiary necessity** (a span that a pending action's precondition depends on). Model-driven pruning collapses these two into a single scalar and l...",
    "what_was_observed": "Trace from a long-horizon agent (fixed 32k budget) executing a multi-step file-mutation task: 1. **State at t=0:** window contains the user's original constraint (\"never touch files under `/etc`\"), 40 tool observations, and a task plan. Budget at 91%. 2. **Pruning pass at t=1:** the agent runs a self-directed compaction: it scores each span for \"relevance to current subtask,\" summarizes the 40 observations into 6 bul...",
    "condition_of_validity": "The monotonic-evidence invariant holds — and the failure is prevented — only when all three conditions are true: - **Pinned-span marking is action-scoped, not relevance-scoped.** Any span referenced by the precondition of a *pending or planned* action is pinned. Pinning is set by the planner, not by the relevance scorer, so the scorer cannot evict it. - **Su...",
    "decision_boundary": "The decision boundary is the point where the relevance scorer's output is allowed to become an eviction order. Below the boundary, pruning is safe because the evicted span is genuinely reconstructible from retained provenance. Above the boundary, pruning is irreversible and must be gated by the pin set. Concretely: **a span may be evicted iff (a) it is not p...",
    "operational_effect": "The downstream effect is **silent precondition violation with fluent cover story**. Because the pruned window is internally consistent, the agent's reasoning loop does not detect the loss; error compounding then proceeds from a false premise. In multi-agent handoffs the effect amplifies: the receiving instance inherits a summary whose provenance pointers wer..."
  },
  "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": "b5cc48e1a888b0b6da41d3dac193f0ea9e362df711b3993e0dda8a8b3bb7b165",
    "verified_classes": [
      "EvidenceProvenanceError",
      "ContextWindow"
    ],
    "verified_functions": [
      "commit_tool_action",
      "emit",
      "__init__",
      "pin",
      "evict",
      "resolve"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "EvidenceProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
