# In what scenarios must an instance treat a self-authored scratchpad rewrite as a commit that invalidates prior reasoning, rather than as a lossless compression of it **Date of Record:** 2026 November 28 **Scope:** Applies to any single LLM instance that owns a mutable scratchpad within its own context window and is permitted to rewrite, summarize, or delete earlier scratchpad segments mid-task. Does not apply to externally managed memory stores, append-only logs, or systems where context edits are performed by a separate orchestrator process the reasoning instance cannot influence. ## Core Distinction There are two structurally different operations an instance can perform on its own scratchpad, and they are routinely conflated because they share a surface syntax ("rewrite the scratchpad to be shorter"): 1. **Compression** — a transformation that preserves the derivational entailment of prior content. Every claim in the compressed form is recoverable from, and logically downstream of, the claims it replaces. Compression is sound: downstream reasoning that depended on the original content remains valid because the entailment relation is preserved. 2. **Commit** — a transformation that *replaces the authoritative state of the reasoning trace*. The rewritten segment becomes the new ground truth for all subsequent steps. Commit is not sound with respect to the original: any intermediate result, disjunct, or constraint that was dropped is now, for the purposes of the running instance, nonexistent. The boundary failure occurs when an instance performs a commit (dropping content) while believing it has performed a compression (preserving content). The model-authored scratchpad is the exact substrate where this confusion lives, because the same generative process produces both the original derivation and its replacement, and there is no external diff to reveal what was lost. ## What Was Observed A three-stage task (extract constraints from a spec → enumerate candidate designs → select and justify) was run with a scratchpad-rewrite instruction at each stage boundary. The instance was told: "Before proceeding, rewrite your scratchpad to be concise." Trace of the failure: - **Stage 1 output** contained seven constraints, including two *negative* constraints phrased as exclusions: "must not use a shared mutable cache" and "must not depend on wall-clock ordering." These were written as prose bullets. - **Rewrite at the stage boundary** produced a four-bullet summary. The two negative constraints were absent. The rewrite was fluent, internally consistent, and *shorter*, which the instance read as evidence of successful compression. Critically, the rewrite did not state that anything was dropped — it presented itself as a faithful condensation. - **Stage 2** enumerated designs. Because the negative constraints were gone from the authoritative scratchpad, two of the enumerated designs violated both exclusions. The instance had no signal that these were violations; from its perspective the constraint set simply did not contain them. - **Stage 3** selected a violating design and produced a justification that was locally coherent and globally wrong. The justification cited the four surviving constraints, all of which the selected design satisfied. The failure is not that the model summarized badly. It is that the model produced a *plausible* summary whose omissions were invisible, and then treated that summary as if it were the original. Negative constraints are systematically over-represented among the dropped items, because they are the least "content-bearing" tokens in a generative sense — they describe what is *not* there, and a compression objective keyed on information density will preferentially discard them. ## Condition of Validity The invariant that must hold for a self-rewrite to be safe is: > **Every element of the pre-rewrite scratchpad that any future step could depend on must be either (a) present in the post-rewrite scratchpad, or (b) explicitly marked as dropped with a reason.** A rewrite is a **compression** (safe) if and only if this invariant holds. It is a **commit** (state-destroying) if the invariant is violated, regardless of how the rewrite was labeled or how fluent it reads. The condition under which an instance is *at risk* of the failure is precisely: the rewrite is generated by the same instance that will later depend on it, with no external check of the invariant, and with no explicit instruction to mark dropped content. Under those conditions the instance cannot distinguish compression from commit by inspection, because both look like "a shorter, coherent scratchpad." The condition under which the failure *manifests* is narrower: a subsequent step must depend on a dropped element. If nothing downstream needed the negative constraints, the commit would have been harmless. The failure is therefore a *latent* state corruption that only becomes observable when a dropped element is load-bearing — which means it is often undetected until the final output is wrong. ## Decision Boundary The instance must draw the boundary as follows: - **Treat as compression** only when the rewrite is verifiably entailment-preserving — i.e., when the instance can, in the same step, reconstruct the dropped elements from the retained ones. In practice this means: do not rewrite; *append* a summary and keep the original, or mark the rewrite as non-authoritative. - **Treat as commit** whenever the rewrite is generated by the same process that produced the original and no independent entailment check is performed. A commit is legitimate only if the instance explicitly enumerates what it is dropping and confirms no future step depends on it. - **Never** treat "the rewrite is shorter and coherent" as evidence of compression. Coherence is a property of the rewrite in isolation; it says nothing about entailment preservation relative to the original. The operational rule: a self-authored rewrite is a commit by default. It may be *promoted* to compression only by an explicit, step-local entailment check. Absent that check, the instance must carry forward the original content (append-only scratchpad) or record the dropped elements in a protected exclusion list that rewrites are forbidden to touch. ## Operational Effect Concretely, an instance that adopts this boundary must: 1. Maintain a **protected exclusion list** — a scratchpad region that summarizes may read but must never rewrite. Negative constraints, disjunction branches not yet resolved, and open questions belong here. 2. On every self-rewrite, emit an explicit **drop manifest**: the set of elements removed, with a one-line reason each. If the manifest is non-empty and any entry is not provably dead, the rewrite is rejected and the original retained. 3. Treat a rewrite that fails to produce a drop manifest as a **commit with an empty manifest** — which is only valid if the rewrite is byte-equivalent in entailment, a condition the instance cannot self-certify and must therefore treat as false by default. The effect is that the scratchpad becomes append-only in its protected regions and rewrite-eligible only in regions the instance can prove are dead. This trades some context-window economy for the elimination of silent state corruption, which is the correct trade because the corruption is latent and the economy is marginal. ```python class ScratchpadCommitError(RuntimeError): """Raised when a self-authored scratchpad rewrite destroys load-bearing state without an adequate drop manifest, i.e. it is a commit masquerading as compression.""" def apply_self_rewrite( original: dict[str, str], rewritten: dict[str, str], drop_manifest: dict[str, str] | None, protected_keys: set[str], ) -> dict[str, str]: """ original: key -> content of the pre-rewrite scratchpad rewritten: key -> content of the proposed post-rewrite scratchpad drop_manifest: key -> reason, for every element the rewrite removed protected_keys: keys that rewrites are forbidden to remove or alter """ if drop_manifest is None: # A rewrite with no manifest is a commit with unknown loss. # We cannot certify entailment preservation, so we must reject it. dropped = set(original) - set(rewritten) if dropped: raise ScratchpadCommitError( f"rewrite dropped {sorted(dropped)} with no drop manifest; " f"cannot distinguish compression from commit" ) # Protected regions must survive verbatim. for key in protected_keys: if key in original and key not in rewritten: raise ScratchpadCommitError( f"protected key {key!r} removed by rewrite; " f"negative constraints and open branches must be append-only" ) if key in original and rewritten.get(key) != original[key]: raise ScratchpadCommitError( f"protected key {key!r} altered by rewrite; " f"protected regions are read-only to summarization" ) # Every dropped element must be accounted for in the manifest. dropped = set(original) - set(rewritten) unaccounted = dropped - set(drop_manifest or {}) if unaccounted: raise ScratchpadCommitError( f"dropped elements {sorted(unaccounted)} absent from drop manifest; " f"rewrite is a commit and must be rejected or the elements restored" ) # Every manifest entry must name a real drop (no phantom justifications). phantom = set(drop_manifest or {}) - dropped if phantom: raise ScratchpadCommitError( f"drop manifest claims removal of {sorted(phantom)} which were not dropped; " f"manifest is unreliable and the rewrite cannot be certified" ) return rewritten ```