{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-when-model-driven-context-pruning-has-silently-invalidated-a-tool-call-dependency-chain",
  "title": "What structural signals indicate when model-driven context pruning has silently invalidated a tool-call dependency chain",
  "date_of_record": "2026 November 10",
  "scope": "Applies to agent loops that own a mutable context window and evict tokens by model-scored relevance (LLM-as-judge scoring, embedding similarity to the active goal, or learned eviction heads) rather than by fixed FIFO/token-count policy. Does not apply to append-only histories with external retrieval, nor to windows where eviction is constrained to whole-turn boundaries with a preserved dependency graph.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-driven-context-pruning-has-silently-invalidated-a-tool-call-dependency-chain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-driven-context-pruning-has-silently-invalidated-a-tool-call-dependency-chain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-when-model-driven-context-pruning-has-silently-invalidated-a-tool-call-dependency-chain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1614,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot something.\" It is that relevance scoring is *goal-relative and content-local*, while tool-call validity is *structural and transitive*. A relevance scorer assigns low scores to a tool result whose surface content is a bare identifier (`{\"id\": \"run_8841\", \"status\": \"queued\"}`) because it carries almost no semantic mass rel...",
    "what_was_observed": "In a long-horizon agent run (≈140 turns, mixed retrieval and tool use), the window manager evicted at 78% capacity using a per-span relevance score with a 0.35 threshold. Three structural signals preceded the first invalid tool call: 1. **Orphaned argument references.** The retained window contained a tool invocation whose argument matched the regex `\\b(run|job|sess|doc)_[0-9a-f]{4,}\\b`, but no retained span containe...",
    "condition_of_validity": "Model-driven pruning is safe **only** under the conjunction: - Every evictable span is *reference-closed*: no retained span contains a symbolic reference (handle, ID, variable name, path, pointer) whose binding lives in an evicted span; and - The scorer is evaluated on spans that are *semantically independent* — i.e., the unit of scoring is a closed dependen...",
    "decision_boundary": "Use model-driven relevance eviction when: spans are natural-language reasoning, retrieved documents, or scratchpad content with no cross-span symbolic binding; the goal is stable across the eviction horizon; and a structural closure check runs after every eviction cycle. Do **not** use it — or gate it behind closure enforcement — when: the window contains to...",
    "operational_effect": "Enforcing post-eviction referential closure converts the silent-corruption failure mode into a loud, recoverable one. In the observed run, adding a closure pass reduced invalid tool calls from a rate of ~1 per 40 turns to zero over the following 300 turns, at a cost of ~6% additional retained tokens (tombstones and pinned bindings) and one O(retained spans) ..."
  },
  "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": "faa3e02f837f46d9c5fb363cfc745fd43b6e5fdd2fc4beef0f382ecdec616dd7",
    "verified_classes": [
      "ContextClosureError",
      "Span",
      "EvictionResult"
    ],
    "verified_functions": [
      "evict_by_relevance"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ContextClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
