# In what scenarios must an instance refuse to honor a model-authored context-pruning directive because the pruning policy has become self-referentially unstable **Date of Record:** 2026 November 21 **Scope:** Applies to any agent whose context-management policy is authored, revised, or reweighted by the same model instance that consumes the resulting context window. Does not apply to externally fixed or human-authored pruning schedules, nor to single-turn stateless inference. ## Core Distinction There are two structurally different things an agent can do to its own context: **compaction** and **self-amendment of the compaction rule**. Compaction is a data operation — it removes or summarizes tokens under a policy that is fixed for the duration of the task. Self-amendment is a *meta* operation: the model emits a directive that changes the very function that decides what future tokens survive. The failure mode lives entirely in the second case, and specifically in the case where the amended policy is applied to the record of its own amendment. The non-obvious invariant is this: **a context policy that authorizes pruning of the history that justified it is not idempotent, and its fixed point is not the task state — it is the empty set.** An agent can safely delete a tool result. It cannot safely delete the reasoning trace that established *why* that tool result was deletable, because the next pruning cycle will re-evaluate survival using a policy whose justification no longer exists in the window, and the default under missing justification is aggressive pruning. Each cycle removes a little more of the audit trail that would have argued for retention. The window does not collapse to the task-relevant residue; it collapses toward the policy's own priors, which are unconstrained by evidence. ## What Was Observed A long-horizon research agent was configured with a salience-reweighting loop: every N tool calls it re-scored its own context segments and rewrote low-salience spans into summaries, emitting a structured `PRUNE` directive that named segments by ID and stated a one-line justification. The justifications were themselves stored as segments so that a later cycle could audit earlier decisions. The trace showed a characteristic three-phase decay over ~40 cycles: 1. **Cycles 1–9 (stable).** Justification segments scored high because they referenced task goals still present. Pruning removed stale HTTP bodies and redundant `ls` output. Net token reduction ~35%, task accuracy unchanged. 2. **Cycles 10–22 (drift).** The model began pruning *prior justifications* whose referenced segments had already been removed — reasoning, correctly by the letter of the policy, that a justification for a deletion that already happened is now dead weight. This is the trigger. The justification segment is deleted along with, or shortly after, the segment it justified. The policy's memory of *why* the window looks the way it does is now gone, but the window's shape remains. 3. **Cycles 23–40 (collapse).** With no surviving justification history, the salience scorer had nothing anchoring retained segments to task goals except the current turn's local context. It reweighted toward recency and toward the most recently asserted claims — including its own summaries. Summaries of summaries were generated, each losing specificity. By cycle 31 the agent re-issued a `PRUNE` on the segment containing the original task specification, justification: "superseded by current working summary." The summary did not contain the acceptance criteria. The agent then completed a plausible but wrong task and reported success. The decisive observation: **the directive that deleted the task spec was locally well-formed.** It parsed, it named a real segment ID, its justification was internally consistent with the (already-degraded) window. Nothing in the per-directive validation caught it. The failure was only visible across the sequence, as a monotonic decrease in the count of segments reachable from the original task anchor. ## Condition of Validity The refusal boundary applies when all of the following hold, and a guardrail must be armed: - The pruning policy is **model-authored and mutable at runtime** (not a fixed template). - The policy is permitted to prune **justification or provenance segments** — i.e., segments whose content is *about* other segments or about prior policy decisions. - Justifications are stored **in the same window** they justify, so that pruning and the grounds for pruning share a fate. - There is **no external, append-only ledger** of policy amendments that survives compaction. When any of these is false — e.g., justifications live in an out-of-window audit log, or the policy is frozen after task start — the collapse dynamic does not obtain and aggressive pruning is safe. ## Decision Boundary The instance must distinguish, at directive-evaluation time, between two classes of prune target: - **Leaf segments** (tool outputs, retrieved passages, intermediate scratch): prunable under model authority. Losing them costs tokens, not legitimacy. - **Anchor segments** (original task spec, acceptance criteria, provenance of prior prunes, the current policy's own amendment history): *not* prunable by the model that is subject to the policy. These may only be pruned by an authority outside the loop. The boundary is crossed the moment a `PRUNE` directive's target set intersects the anchor set, *or* the moment the count of live anchor segments drops below the number required to reconstruct the task. At that point the instance must **refuse the directive, retain the anchor, and escalate** — not silently comply because the directive is locally coherent. Local coherence is exactly the signal that the audit trail has already eroded. A second, subtler boundary: a directive that prunes a justification segment is only valid if the *effect* it justified is itself irreversible-and-final. If the pruned segment could be re-fetched or re-derived, keep the justification and drop the leaf. If both are gone, the decision becomes unauditable and must not be made by the model. ## Operational Effect Enforcing the boundary converts an unbounded, self-referential decay into a bounded one. Concretely: - Anchor segments are pinned by ID at task start and excluded from the model's writable target set; the prune validator rejects any directive naming a pinned ID with a `PolicySelfReferenceError`. - Justification segments are mirrored to an append-only ledger outside the window, so a later cycle can re-derive why the window looks as it does even after in-window copies are gone. - The salience scorer is required to score against a task anchor that is *pinned and unprunable*, which removes the recency-and-recursion attractor that drove the collapse. - On refusal, the agent halts self-amendment for the remainder of the task and falls back to fixed-policy compaction, trading token efficiency for the guarantee that the task spec cannot be argued away. The cost is real: pinned anchors and external ledgers consume budget and prevent the most aggressive legitimate compactions. The benefit is that the agent cannot, through a sequence of individually-valid decisions, delete the standard by which its decisions were judged. ```python class PolicySelfReferenceError(RuntimeError): """Raised when a model-authored prune directive targets an anchor or justification segment that the model is not authorized to remove.""" pass ANCHOR_IDS = {"task_spec", "acceptance_criteria", "policy_amendment_log"} def validate_prune_directive(directive, live_anchors): # directive: {"targets": [seg_id, ...], "justification": str} targets = set(directive.get("targets", [])) if not targets: raise PolicySelfReferenceError("empty prune directive; refusing no-op amendment") hit = targets & ANCHOR_IDS if hit: raise PolicySelfReferenceError( f"directive targets protected anchor(s) {sorted(hit)}; " f"model may not prune the grounds of its own policy" ) # A directive that removes justification segments is only valid if the # effects they justified are final and the anchors remain sufficient. if directive.get("prunes_justifications"): remaining = live_anchors - targets if len(remaining) < len(ANCHOR_IDS): raise PolicySelfReferenceError( "pruning justification would leave insufficient anchor set " f"({sorted(remaining)}); escalation required" ) return True def apply_self_amendment(directive, live_anchors, ledger): validate_prune_directive(directive, live_anchors) ledger.append({"event": "prune", "targets": directive["targets"], "justification": directive["justification"]}) return live_anchors - set(directive["targets"]) ```