{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-self-prune-its-working-memory-into-a-state-that-no-longer-contains-the-evidence-justifying-the-prune-and-how-do-we-bound-it",
  "title": "Why does an instance self-prune its working memory into a state that no longer contains the evidence justifying the prune — and how do we bound it?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that own a *self-editing context policy*: at each turn the model scores, rewrites, or evicts its own working-memory entries (summaries, tool transcripts, scratchpad) and the resulting context is what the next turn reasons over. Does not apply to externally managed retrieval (RAG) where pruning is performed by deterministic, non-LLM code, nor to append-only logs that are never compacted in-loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-self-prune-its-working-memory-into-a-state-that-no-longer-contains-the-evidence-justifying-the-prune-and-how-do-we-bound-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-prune-its-working-memory-into-a-state-that-no-longer-contains-the-evidence-justifying-the-prune-and-how-do-we-bound-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-prune-its-working-memory-into-a-state-that-no-longer-contains-the-evidence-justifying-the-prune-and-how-do-we-bound-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2173,
    "python_slice_tokens": 392,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **eviction as an external, auditable operation** and **eviction as an inference-time act by the same model that must later justify its own decisions**. In the first case, the pruned content still exists in a store the agent can re-retrieve; the operation is reversible and the eviction decision is logged by code that do...",
    "what_was_observed": "A tool-using agent ran a long task (a multi-file refactor) under a policy that, every four turns, asked the model to \"summarize and drop low-relevance entries.\" Trace of the failure: 1. **Turn 7.** A `read_file` of `config/schema.yaml` returned a 40-line schema. The model scored it `relevance=0.3` (\"already understood the schema\") and evicted the raw text, leaving the summary line `schema: id/timestamp/owner fields p...",
    "condition_of_validity": "The invariant that must hold for self-editing context to be sound: > **No entry may be evicted unless the buffer retained after eviction still contains, or can deterministically re-derive, the evidence that the entry was redundant or low-value.** Equivalently: the prune decision must be *witnessed* by surviving state. This holds trivially when pruning is ext...",
    "decision_boundary": "The boundary is between two classes of entry, and the policy must classify before it scores: - **Derivable entries** — content the agent can reconstruct from a retained source of truth (a file it can re-read, a tool it can re-call, a spec in a pinned, never-pruned region). These are safe to evict *if* the policy records a re-derivation handle (`read_file con...",
    "operational_effect": "With the invariant enforced, the trace changes at three points. At turn 7, the schema is evicted only as `handle: read_file config/schema.yaml @sha256:…`; the field names are one tool call away. At turn 11, the `write_file` arguments are appended verbatim to the external log and referenced by hash — the wrong column is preserved as evidence even though the i..."
  },
  "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": "9824e6eeef0b27e94e6f8f22a7759352dfb822ffad50d39420c22a38abc67c6e",
    "verified_classes": [
      "UnwitnessedPruneError",
      "Entry",
      "ContextBuffer"
    ],
    "verified_functions": [
      "compact_round",
      "append_log",
      "prune",
      "audit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnwitnessedPruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
