{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-its-own-working-memory-silent-loss-of-the-negative-evidence-invariant-under-budget-adaptive-context-controllers",
  "title": "What happens when an instance rewrites its own working memory: silent loss of the negative-evidence invariant under budget-adaptive context controllers",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent loop where a controller (deterministic or LLM-driven) mutates the working-memory buffer in-place between reasoning steps—deduplicating, summarizing, re-ranking, or evicting entries to satisfy a token ceiling. Does not apply to append-only logs that are only *read* through retrieval, nor to single-shot prompts assembled once per task.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-memory-silent-loss-of-the-negative-evidence-invariant-under-budget-adaptive-context-controllers.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-memory-silent-loss-of-the-negative-evidence-invariant-under-budget-adaptive-context-controllers.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-memory-silent-loss-of-the-negative-evidence-invariant-under-budget-adaptive-context-controllers.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2072,
    "python_slice_tokens": 452,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **relevance-ranked memory** and **constraint-bearing memory**. A relevance ranker scores each memory item by estimated utility to the current subgoal. A constraint-bearing item (a failed attempt, a forbidden tool, a rejected hypothesis, a superseded fact) has *negative* or *zero* utility to the current subgoal but *unb...",
    "what_was_observed": "A tool-using agent was given a 32k-token working budget and a controller that, on every step where the buffer exceeded 80% saturation, (1) deduplicated near-identical entries by cosine similarity ≥ 0.92, (2) summarized the oldest 40% of entries into a single digest via an LLM call, and (3) re-ranked remaining entries by an embedding similarity to the current user turn, evicting the bottom 15%. The failure trace, on a...",
    "condition_of_validity": "The negative-evidence invariant is only load-bearing under a conjunction of conditions, and it is precisely because all of them co-occur in production that this is not a corner case: - **Schema non-determinism at the argument level.** The failure is a property of a *specific argument binding*, not of the tool. If the tool failed categorically, the agent coul...",
    "decision_boundary": "The boundary is not \"compress less.\" It is a **retention partition**: memory entries carry a class, and the controller's eviction policy must be class-aware. - **Positive/contextual entries** (observations, retrieved docs, successful outputs) may be scored, deduplicated, and evicted by any relevance function. - **Negative-evidence entries** (failed attempts ...",
    "operational_effect": "When the invariant is enforced, the agent's behavior changes in a measurable way: repeated-failure rate to the same argument class collapses toward zero after the first failure, because the binding is retained as a hard constraint and the planner is forced to vary the binding rather than re-derive the plan. Token cost rises modestly—negative entries are smal..."
  },
  "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": "8027840447dbda425a5ae1e40f649041e561605dbaa8a77a2d3201e8d82af5c1",
    "verified_classes": [
      "Polarity",
      "MemoryEntry",
      "ConstraintEvictionError",
      "SelfEditingContextController"
    ],
    "verified_functions": [
      "__init__",
      "record",
      "_would_drop_constraint",
      "dedup",
      "evict_bottom",
      "assert_invariant"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
