{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-pruned-context-window-has-silently-orphaned-a-live-tool-call-dependency",
  "title": "What structural signals indicate a self-pruned context window has silently orphaned a live tool-call dependency",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that let the model itself select, score, or evict context segments mid-task (model-driven pruning, relevance-scored compaction, self-editing scratchpads). Does not apply to fixed-window truncation or purely external summarizers that operate on immutable snapshots.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruned-context-window-has-silently-orphaned-a-live-tool-call-dependency.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruned-context-window-has-silently-orphaned-a-live-tool-call-dependency.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruned-context-window-has-silently-orphaned-a-live-tool-call-dependency.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1618,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **relevance** and **reachability** in a self-editing context. A pruning policy scores each segment by estimated relevance to the current objective and evicts the lowest scorers. This is sound when segments are independent evidence. It is unsound when a segment is *referenced by structure* rather than *relevant by ...",
    "what_was_observed": "A long-running agent issued a tool call to a document indexer, receiving a deferred handle rather than an immediate result. The handle was logged as a compact structured segment—roughly forty tokens: `{\"call_id\": \"ix_7f2\", \"status\": \"pending\", \"resume_key\": \"…\"}`. Several turns and ~60k tokens of reasoning later, the model invoked its own compaction pass with a relevance-scoring prompt: \"Retain segments most useful f...",
    "condition_of_validity": "Model-driven pruning is safe only under this invariant: **every segment that is the target of an open continuation must be pinned, and pinning must be computed from structural references, not from content relevance.** Concretely, before any eviction pass runs, the agent must compute the set of *live references*—open `call_id`s, unfilled argument slots, outst...",
    "decision_boundary": "The boundary is not \"prune or don't prune.\" It is whether the pruner has access to a **reachability oracle** at edit time. - If the agent can enumerate live continuations from execution state and pin them, model-driven pruning is admissible; relevance scoring operates only on the *unpinned* remainder. - If the agent cannot enumerate live continuations—becaus...",
    "operational_effect": "The practical consequence is that self-editing context requires a **pinning pass ordered before scoring**, and a **post-edit reachability audit** ordered after. The pinning pass consumes the live-reference set from the execution layer and hard-excludes those spans. The audit re-derives the live-reference set and asserts every reference still resolves to a re..."
  },
  "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": "a4958fc797ff013c74f5e85ebd233c718cbc1094572765c371d11e70a45db66c",
    "verified_classes": [
      "OrphanedContinuationError",
      "Segment",
      "LiveReference",
      "ContextWindow"
    ],
    "verified_functions": [
      "compact",
      "pin_set",
      "self_edit",
      "resolve"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OrphanedContinuationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
