{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-pruning-agent-has-silently-invalidated-its-own-referent-bindings",
  "title": "What structural signals indicate a self-pruning agent has silently invalidated its own referent bindings",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that mutate their own working context (prune, summarize, reorder, or rewrite blocks) mid-episode while holding live references to those blocks (tool-call IDs, variable bindings, span offsets, message indices). Does not apply to append-only contexts or to external memory stores that are addressed by stable keys independent of window position.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-agent-has-silently-invalidated-its-own-referent-bindings.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-agent-has-silently-invalidated-its-own-referent-bindings.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-pruning-agent-has-silently-invalidated-its-own-referent-bindings.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2214,
    "python_slice_tokens": 496,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different kinds of \"context editing\" an agent can perform, and they fail in opposite ways: - **Positional editing** — delete, summarize, or reorder message blocks to reclaim tokens. This changes the *index space* of the window. Anything that referenced a block by ordinal position, span offset, or implicit \"the message right after ...",
    "what_was_observed": "Trace from a research/ops agent running a 40-step episode against a 32k window, with a self-pruning policy that triggers at 85% occupancy: 1. **Steps 1–14.** Agent executes tool calls; each result is appended as a `tool_result` block with a `call_id`. Plan state holds `pending_steps = [..., \"refund order_id=4471\", ...]` and `bindings = {order_id: 4471}` derived from step 9's tool result. 2. **Step 15, occupancy 27.4k...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously: - **Binding-by-literal or binding-by-position.** The plan state references context content by a string literal, span offset, message index, or relative position (\"the tool result above\"). If bindings are by opaque stable key (a UUID that lives in external memory and is re-fetched on demand), p...",
    "decision_boundary": "The boundary is between **pruning as compression** and **pruning as rebinding**. The operational rule: > A self-edit is safe iff for every live binding `b` in plan state, either (i) `b`'s referent span survives the edit unchanged, or (ii) the edit writes an explicit tombstone into plan state that forces re-acquisition of `b` before its next use. Concretely, ...",
    "operational_effect": "Downstream, the invalidation produces a characteristic error signature that is easy to misdiagnose: - **Hallucinated literals.** The model fills the pruned slot with a plausible value (a nearby order ID, a fabricated UUID). This looks like a reasoning error but is a memory error. - **Stalled episodes.** The model correctly notices the missing anchor and asks..."
  },
  "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": "68ba34721052c218942cda5747fcdd6d7f3fb8afd740efb9577412f8c31236b6",
    "verified_classes": [
      "BindingInvalidatedError",
      "Binding",
      "Window"
    ],
    "verified_functions": [
      "prune",
      "tombstone_and_prune",
      "dereference",
      "contains_literal"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "BindingInvalidatedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
