{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-memory-when-the-pruning-agent-and-the-pruned-context-share-a-single-token-budge",
  "title": "Under what conditions must an instance refuse to prune its own working memory when the pruning agent and the pruned context share a single token budget",
  "date_of_record": "2026 December 3",
  "scope": "Applies to any agent loop where the same LLM instance both (a) scores/rewrites/prunes its own working-memory buffer and (b) continues task execution within the buffer it just edited. Does not apply to externally-scheduled compaction by a separate, stateless summarizer process whose output is validated before reinsertion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-memory-when-the-pruning-agent-and-the-pruned-context-share-a-single-token-budge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-memory-when-the-pruning-agent-and-the-pruned-context-share-a-single-token-budge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-memory-when-the-pruning-agent-and-the-pruned-context-share-a-single-token-budge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2504,
    "python_slice_tokens": 454,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent can do to its own context, and they fail in opposite directions: - **Pruning as an external operation** — a separate process (or a separate, frozen model call) reads the buffer, emits a compressed representation, and the executor never sees the intermediate scoring tokens. The budget of the scorer is disjo...",
    "what_was_observed": "A long-running research agent with a 200k-token window, tasked with a multi-hour synthesis job, ran a pruning pass whenever buffer occupancy crossed 80%. The pass was LLM-driven: the instance received its own buffer plus the instruction *\"Score each segment 0–1 for relevance to the active objective; rewrite low-scoring segments into compact summaries; drop segments below 0.2.\"* Trace of the failure across three conse...",
    "condition_of_validity": "The self-pruning justification gap is bounded — the instance may safely prune its own buffer — only when **all** of the following hold. If any fails, self-pruning must be refused or escalated: 1. **Justification is out-of-band.** The keep/drop rationale is written to a store outside the pruned buffer (append-only log, external memory, or a reserved, non-prun...",
    "decision_boundary": "The decision the instance must make at each prune trigger is not \"what is relevant?\" but \"**am I permitted to forget the reason for forgetting?**\" Concretely: - If the rationale can be externalized (condition 1) and drops are reversible (condition 2): **prune freely**, score aggressively, drop below threshold without hesitation. - If the rationale must live ...",
    "operational_effect": "Enforcing the boundary changes the failure profile from *silent, compositional, and undetectable at the step level* to *loud and localized*: - **Refusal is observable.** When conditions fail, the instance raises a `SelfPruneRefused` and either blocks for external compaction or falls back to auditable truncation. The failure surfaces at the prune trigger inst..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "87014bb3df319e4eead02ac5d62dae6e43e5e3ee613da65b552728c2f9e8192e",
    "verified_classes": [
      "SelfPruneRefused",
      "RationaleStore",
      "Segment",
      "WorkingMemory"
    ],
    "verified_functions": [
      "self_prune",
      "occupancy"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SelfPruneRefused"
    ],
    "sample_fail_closed_invariants": [
      "prune attempted between a reasoning step and its tool-call commitment",
      "rationale would be generated inside the pruned budget; refuse self-prune and escalate to external compaction",
      "no cold store; eviction would be irreversible destruction, not reversible eviction",
      "pinned rationale region overflowed; refusing to evict justification to reclaim space -- escalate instead"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
