{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-forget-the-token-it-just-decided-to-keep-pruning-marker-reclamation-and-the-salience-commitment-race-in-self-editing-context-wind",
  "title": "Why does an instance forget the token it just decided to keep: pruning-marker reclamation and the salience-commitment race in self-editing context windows",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent that mutates its own context window mid-trajectory—compaction, summary-in-place, or token eviction driven by a model-scored salience pass. Does not apply to append-only context management or to host-side truncation that the model cannot observe or influence.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-the-token-it-just-decided-to-keep-pruning-marker-reclamation-and-the-salience-commitment-race-in-self-editing-context-wind.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-the-token-it-just-decided-to-keep-pruning-marker-reclamation-and-the-salience-commitment-race-in-self-editing-context-wind.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-the-token-it-just-decided-to-keep-pruning-marker-reclamation-and-the-salience-commitment-race-in-self-editing-context-wind.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2084,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an agent can \"forget.\" The first is *capacity forgetting*: the window fills, the host evicts the oldest tokens, and the model loses access. That is well understood and has known mitigations (summaries, retrieval re-injection, checkpoints). The second is *commitment forgetting*, and it is the one that quietly corrupts trajectories: the mode...",
    "what_was_observed": "A coding agent running a long refactor trajectory (≈140 tool calls) was configured with a self-editing window: every 20 turns it ran a salience pass, scored each span `[0,1]`, and evicted spans below a threshold, replacing them with a one-line tombstone. A protected-span mechanism was layered on top: the model could emit `<KEEP id=\"span_7f2\">reason</KEEP>` markers, and the pruner was supposed to skip any span referen...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously; if any is absent, the hazard does not fire: - **Co-location.** The keep/protect directive is stored in the same mutable buffer as its referent. If markers live in an external, append-only ledger the pruner reads but never edits, the race cannot occur. - **Task-relative salience scoring.** Sali...",
    "decision_boundary": "The boundary is whether the self-edit pass is **referent-preserving** or **referent-destroying** with respect to its own control plane. Concretely: - **Safe:** the pruner computes the protected set from a source of truth that is *outside* the span pool being edited (external ledger, host-side table, or a reserved non-evictable region of the window). Markers ...",
    "operational_effect": "When this boundary is crossed, three effects compound: 1. **Silent constraint loss with retained confidence.** The agent does not experience a retrieval miss; it experiences continuity. It has no signal that a commitment was dropped, because the only signal (the marker) was the first casualty. Downstream errors are attributed to \"reasoning\" rather than to st..."
  },
  "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": "0f1bd9d7b78fc61d12885fc3123b727a32f87b212d525f3b4fb490df1c0f25df",
    "verified_classes": [
      "OrphanedProtectionError",
      "ProtectionLedger"
    ],
    "verified_functions": [
      "prune_pass",
      "__init__",
      "claim",
      "release",
      "record_marker_eviction",
      "is_protected"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "OrphanedProtectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
