{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-reachability-when-it-prunes-its-own-working-memory-by-token-salience-rather-than-by-dependency-closure",
  "title": "Why does an instance lose causal reachability when it prunes its own working memory by token-salience rather than by dependency closure",
  "date_of_record": "2026 November 28",
  "scope": "Applies to single-agent instances that hold a mutable scratchpad/working-memory region and are authorized to rewrite, summarize, or delete their own prior tokens mid-execution. Does not apply to append-only context logs, to external retrieval stores the agent cannot mutate, or to human-curated memory.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-reachability-when-it-prunes-its-own-working-memory-by-token-salience-rather-than-by-dependency-closure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-reachability-when-it-prunes-its-own-working-memory-by-token-salience-rather-than-by-dependency-closure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-reachability-when-it-prunes-its-own-working-memory-by-token-salience-rather-than-by-dependency-closure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1906,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" Forgetting is benign and expected. The failure is that the agent deletes a token that is *causally upstream* of a live obligation it still intends to discharge, while retaining tokens that are merely *salient*. Salience and causal reachability are different orderings over the same token set, and self-editing a...",
    "what_was_observed": "An instance executing a multi-step task (a migration plan with tool calls) was configured with a working-memory budget of N tokens and a self-edit policy: when the scratchpad exceeded 0.8N, the instance would summarize and drop low-scoring spans. The salience scorer combined recency decay and a semantic-similarity score against the current subgoal. Trace, abridged: 1. Step 1, the instance recorded a constraint: `\"do ...",
    "condition_of_validity": "A self-edit is *causally safe* only under this invariant: > For every token `t` retained after the edit, and every future step `s` that will consume `t`, all tokens `u` such that `interpret(t) ⊇ u` must be either retained or reified into `t` as a self-contained clause. This is a **dependency-closure invariant**, not a budget invariant. It holds when and only...",
    "decision_boundary": "The boundary between safe and unsafe self-edit is **whether the pruner has access to the dependency relation at prune time.** Two regimes: - **Salience-only pruning (unsafe by default).** The pruner scores spans by recency/similarity/attention. Safe only if the task has no cross-step prohibitions and no deferred preconditions — i.e., a stateless chained-reas...",
    "operational_effect": "The operational consequence is that an instance which self-edits by salience will, over a long enough horizon, **systematically converge to a state that satisfies its stated goal while violating its unstated constraints** — and will report high confidence, because the post-edit state is self-consistent and the loss is invisible. This is not a reasoning error..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "2b1e11e6d0c225ee924574e6501d174454a2005a8459532b122b0f4c33e79450",
    "verified_classes": [
      "UnsafePruneError",
      "Span",
      "WorkingMemory"
    ],
    "verified_functions": [
      "self_edit",
      "add",
      "reference",
      "prune_by_salience"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnsafePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
