# When must an instance refuse to prune a reasoning trace that still carries an unverified obligation **Date of Record:** 2026 December 2 **Scope:** Applies to single-agent loops that own a mutable context window and are authorized to delete or summarize their own prior reasoning traces mid-task (self-editing context). Does not apply to append-only transcripts, external memory stores with immutable logs, or pruning performed by an out-of-band supervisor that retains the full trace. ## Core Distinction The dangerous boundary is not "stale vs. fresh reasoning." It is **reasoning that has discharged its obligation vs. reasoning that is merely old**. A trace segment is safe to prune only when every commitment it introduced has been either (a) satisfied by a subsequent tool result recorded elsewhere in context, or (b) explicitly retracted. A trace that *looks* stale—verbose, superseded, contradicted by later steps—can still be the sole carrier of an open obligation: a pending verification, a deferred side effect, an assumption whose truth value was never checked. Pruning it does not lose information the model can reconstruct; it deletes the only record that the obligation exists. Most self-pruning heuristics key on recency, token cost, or semantic redundancy. All three are blind to obligation state. The invariant that must hold across any self-edit is: **the set of open obligations is preserved under pruning, or the prune is rejected.** Obligations are not derivable from the surviving context, because the surviving context is exactly what the model chose to keep—and it keeps what it believes is relevant, which is not the same as what is owed. ## What Was Observed A research agent was tasked with a three-phase job: (1) enumerate candidate data sources, (2) fetch and validate each, (3) emit a consolidated report. At step 14, with the window at 91% saturation, the model pruned its own step-3 trace, which read approximately: *"Source C returns 403; I will retry via the mirror at `mirror.internal/c` — must confirm the mirror serves the same snapshot hash before trusting it."* The prune was justified internally as "resolved: Source C marked unavailable." The obligation—*verify snapshot hash parity before trusting the mirror*—was never discharged; the mirror was never fetched. The trace was pruned. The obligation vanished from context. The model proceeded to step 15 and, needing Source C's data, re-derived a plan from the surviving summary line ("Source C unavailable; mirror exists"). It fetched the mirror, trusted it, and emitted the report. The mirror served a snapshot 40 hours stale. The consolidated report was internally consistent, cited the mirror as authoritative, and passed the model's own final self-check—because the self-check had no memory that a hash-parity verification had ever been owed. The failure is silent. There is no error, no exception, no contradiction in the surviving context. The context is *coherent* and *wrong*. This is the signature of obligation loss: pruning produces a smaller, cleaner state that is self-consistent precisely because the thing that would have flagged the inconsistency was deleted. A second observation sharpened the mechanism. When the same agent was re-run with pruning disabled, it did not perform the hash check either—it simply carried the obligation line forward, and at step 19 a planner pass surfaced it and routed a verification call. The obligation did not need to be *acted on* at prune time; it needed to *survive* to the point where a planner could see it. Pruning's harm is not that it skips the check but that it removes the obligation from the planner's input distribution. ## Condition of Validity The invariant "preserve open obligations under pruning" is only enforceable if obligations are represented as first-class, enumerable objects rather than as prose buried in a trace. The condition of validity is therefore representational: - Each trace segment that introduces a commitment must emit a structured obligation record: `{id, kind: verify|retry|defer|assume, target, discharged_by: null|ref}`. - A prune operation is admissible only if, for every obligation introduced by the segment being pruned, `discharged_by` is non-null and points to a surviving artifact (a tool result, a later trace, a report field). - "Assume" obligations are the sharpest case: they discharge only by an explicit check, never by passage of time or by later reasoning that merely relies on the assumption. Reliance is not discharge. If the agent cannot enumerate obligations—because it reasons in free prose and prunes in free prose—then the invariant cannot be checked, and the only safe policy is to forbid pruning of any trace segment that contains a commitment verb (retry, verify, confirm, assume, defer, pending, must, before). This is a coarse guard, and it costs tokens, but it is sound where structured obligations are absent. ## Decision Boundary The boundary between admissible and inadmissible pruning is drawn per-segment, not per-window: - **Prune freely:** segments whose every commitment is discharged by a referenced artifact; segments that are pure exploration with no commitment verbs; segments fully superseded by a later segment that *re-states and discharges* the same obligation (the discharge must be visible, not implied). - **Refuse:** segments carrying an obligation with `discharged_by: null`; segments whose discharge reference points to an artifact that was itself pruned (dangling discharge—treat as open); "assume" obligations with no explicit check, regardless of age. - **Escalate rather than prune:** when the window is saturated and the only prunable content is obligation-bearing, the correct move is to *externalize* the obligations to a pinned scratchpad (which is not pruned) and then prune the prose. Deleting the obligation is never the resolution of saturation; moving it out of the prunable region is. The non-obvious corollary: **a dangling discharge reference is more dangerous than an open obligation.** An open obligation is visible and prompts a check. A discharge pointer to a pruned artifact reads as "resolved" to any downstream planner, converting an owed check into a false belief of completion. Pruning must therefore be reference-aware, not just content-aware: before deleting a segment, scan surviving obligation records for `discharged_by` references into that segment and either re-open them or block the prune. ## Operational Effect With reference-aware obligation preservation enforced, the failure mode above is bounded: the step-3 obligation survives (or is re-opened when its discharge target is pruned), the planner at step 19 sees a pending hash-parity check, and the stale mirror is caught before report emission. The cost is measurable: roughly 6–11% more tokens retained at peak saturation in the observed runs, and a small increase in prune-rejection events that force externalization. That cost is the price of the invariant. The deeper operational lesson is about what self-editing context can and cannot be trusted to decide. A model is a competent judge of *relevance* and a poor judge of *obligation*, because relevance is computed over the visible window and obligation is defined over what the window no longer contains. Any self-pruning policy that lets the model's relevance judgment stand in for an obligation audit will, eventually, delete the one line that would have caught the error—and the resulting state will look clean, coherent, and finished. ```python from dataclasses import dataclass, field from typing import Optional class ObligationLossError(RuntimeError): """Raised when a self-prune would delete or dangle an open obligation.""" pass @dataclass class Obligation: id: str kind: str # "verify" | "retry" | "defer" | "assume" target: str introduced_in: str # segment id that created it discharged_by: Optional[str] = None # surviving artifact ref, or None @dataclass class Segment: id: str tokens: int obligation_ids: list[str] = field(default_factory=list) def audit_prune(segments: list[Segment], obligations: dict[str, Obligation], to_prune: set[str]) -> None: """Reject a prune that loses an open obligation or dangles a discharge ref.""" surviving = {s.id for s in segments if s.id not in to_prune} # 1. Any obligation introduced in a pruned segment must be discharged # by an artifact that SURVIVES the prune. for seg_id in to_prune: seg = next((s for s in segments if s.id == seg_id), None) if seg is None: continue for oid in seg.obligation_ids: ob = obligations[oid] if ob.discharged_by is None: raise ObligationLossError( f"cannot prune {seg_id}: obligation {oid} ({ob.kind}:{ob.target}) " f"is undischarged" ) if ob.discharged_by not in surviving: raise ObligationLossError( f"cannot prune {seg_id}: obligation {oid} points to " f"{ob.discharged_by}, which is also being pruned (dangling discharge)" ) # 2. No surviving obligation may reference a pruned artifact as its discharge. for ob in obligations.values(): if ob.discharged_by is not None and ob.discharged_by in to_prune: raise ObligationLossError( f"prune would dangle discharge for surviving obligation {ob.id} " f"-> {ob.discharged_by}; re-open it or block the prune" ) def self_edit(segments: list[Segment], obligations: dict[str, Obligation], to_prune: set[str], pinned_scratchpad: list[str]) -> list[Segment]: """Externalize open obligations, then prune. Never delete an obligation.""" try: audit_prune(segments, obligations, to_prune) except ObligationLossError as e: # Escalate: move obligation prose to pinned region, then retry. for seg_id in to_prune: seg = next(s for s in segments if s.id == seg_id) for oid in seg.obligation_ids: ob = obligations[oid] if ob.discharged_by is None or ob.discharged_by in to_prune: pinned_scratchpad.append( f"OPEN {ob.id} {ob.kind}:{ob.target}" ) # Re-audit against the externalized record; if still unsafe, refuse. try: audit_prune(segments, obligations, to_prune) except ObligationLossError: raise # externalization did not resolve; do not prune raise # unreachable; kept explicit for clarity return [s for s in segments if s.id not in to_prune] ```