# What structural signals indicate an auto-compaction summary has silently dropped an open obligation (the dangling-commitment invariant) **Date of Record:** 2026 November 28 **Scope:** Applies to long-horizon agent sessions where a lossy summarizer replaces evicted context with a compaction artifact, and where the agent has issued commitments (tool-call intents, promises to the user, pending multi-step plans) that must survive compaction. Does not apply to sessions that never evict, or to summarizers that guarantee verbatim retention of a structured obligation ledger. ## Core Distinction Most auto-compaction failure analysis focuses on *information loss*: did the summary retain the fact the agent needed? That framing is too weak to be operational, because lossy summarization is *permitted* to lose facts—that is the contract. The sharper, non-obvious boundary is **obligation loss**: the summary can be a faithful, high-fidelity compression of everything the agent *knows* while still dropping everything the agent *owes*. Knowledge is idempotent—re-reading a file or re-querying a tool recovers it. An obligation is not: it is a commitment with a one-shot external side effect (a `send_email` intent already announced to the user, a `git push` scheduled for "after tests pass," a refund the agent told the customer it would issue). When compaction evicts the turn that carried the commitment, the summary reads as complete and coherent, the agent continues confidently, and the obligation is never discharged—silently. The invariant that must hold is: **every open obligation present in the evicted span must appear in the compaction artifact as an unresolved item, or the compaction must be rejected.** A summary that drops a fact is degraded; a summary that drops an obligation is *unsound*. ## What Was Observed A 40+ turn support-agent session with a 32k context budget and a summarizer triggered at 80% saturation. At turn 27 the agent told the user, verbatim, "I'll issue the refund once the warehouse confirms receipt—I'll follow up by end of day." That sentence contained no tool call; it was pure natural-language commitment. At turn 31, compaction fired and replaced turns 1–24 with a 900-token summary. The summary was *excellent*: it captured the customer ID, the order number, the product, the troubleshooting steps already tried, and the current state ("awaiting warehouse confirmation"). It did not contain the phrase "issue the refund," because the summarizer scored that sentence as low-salience chatter—it had no entities, no tool output, no state mutation. At turn 34 the warehouse confirmation arrived via tool result. The agent, now reasoning over the compacted context, correctly identified the case as resolved and closed the ticket. No refund was issued. The summary was *true* and the session was *wrong*. The failure is not detectable by any summary-quality metric (ROUGE, faithfulness, entailment): the summary entails nothing false. The obligation was simply not in the salience distribution the summarizer optimized for. The structural signal that would have caught it: the evicted span contained a **first-person future-tense commitment verb** (`I'll`, `I will`, `I'm going to`) bound to a **conditional trigger** (`once`, `after`, `when`, `by`) with **no corresponding tool invocation** in the same or subsequent turn. That triple—promise + trigger + no realized effect—is the fingerprint of an open obligation. It is machine-detectable at compaction time and almost never present in the summary, because summarizers are trained to compress *state*, not *debt*. ## Condition of Validity The dangling-commitment failure requires all of the following to co-occur; remove any one and the failure does not manifest: 1. **Commitment is expressed in natural language, not as a tool call.** If the agent emitted a `schedule_refund` tool call, the tool-call record survives compaction (it is structured, high-salience). The failure is specific to *prose obligations* that precede their mechanism. 2. **The commitment is conditional on a future event.** An unconditional promise ("I'll refund you now") is usually followed immediately by the action. A conditional promise defers the action across the compaction boundary, which is exactly where it gets evicted. 3. **Compaction evicts the commitment-bearing turn before the trigger fires.** If the trigger resolves pre-compaction, the obligation is discharged and safe. 4. **The summarizer's salience model treats commitment prose as low-information.** This is the default behavior of most extractive/abstractive summarizers: they weight entity density and tool-output novelty, and a bare promise has neither. The failure does *not* require a bad summarizer. It reproduces with high-quality summarizers precisely because good compression discards low-entity prose—the better the summarizer at its stated objective, the more reliably it drops the obligation. ## Decision Boundary The operational decision is: **at compaction time, do you trust the summary to carry obligations, or do you extract obligations out-of-band before eviction?** The boundary is sharp: - If the evicted span contains **zero** commitment-signal matches, compact normally; the summary is sound with respect to obligations. - If it contains **one or more** matches, the compaction is **not permitted to proceed on the summary alone**. The matched obligations must be lifted into a structured *obligation ledger* that is (a) appended to the compaction artifact verbatim, (b) tagged `OPEN` with the trigger condition, and (c) re-injected into every subsequent context until a matching tool call or explicit discharge closes it. The guardrail is a **pre-eviction obligation scan**, not a post-hoc summary audit. Auditing the summary is too late and structurally impossible: you cannot detect an omission by reading what was kept. You must scan the *input* to compaction for the commitment fingerprint and carry the matches forward independently of the summarizer's judgment. The summarizer is allowed to lose facts; it is not allowed to be the sole custodian of debts. A second boundary: an obligation ledger entry is only closed by a **realized effect** (a tool call with a success result, or an explicit user-facing discharge). A subsequent summary mentioning "refund handled" is *not* a discharge—it is the same prose-obligation failure recursing. Ledger closure must be tied to an event record, never to summary text. ## Operational Effect With the pre-eviction obligation scan and ledger in place, the failure mode converts from silent to loud: at turn 34 the agent's context still contains `OPEN: refund pending warehouse-confirmation (turn 27)`, the warehouse confirmation matches the trigger, and the agent issues the refund before closing. The cost is a small, bounded context overhead (a handful of ledger lines per compaction cycle) and a scan pass over the evicted span. The benefit is that the one class of state that *cannot* be recovered by re-reading—an external commitment already announced to a human—is guaranteed to survive every compaction boundary. Without it, long-horizon sessions accumulate invisible debt: each compaction is locally sound, each summary is faithful, and the session drifts into a state where the agent believes it has discharged obligations it never performed. The invariant to enforce is narrow and testable: *no compaction may evict an open obligation without promoting it to the ledger.* ```python from dataclasses import dataclass, field from typing import Iterable COMMITMENT_VERBS = ("i'll", "i will", "i'm going to", "i am going to") TRIGGER_MARKERS = ("once", "after", "when", "by end of", "as soon as") class DanglingCommitmentError(RuntimeError): """Raised when compaction would evict an open obligation without promoting it.""" @dataclass class Obligation: source_turn: int text: str trigger: str status: str = "OPEN" def discharge(self, realized_tool_call: str) -> None: if not realized_tool_call: raise DanglingCommitmentError( "Obligation cannot be closed by prose; a realized tool-call record is required." ) self.status = "CLOSED" @dataclass class ObligationLedger: entries: list[Obligation] = field(default_factory=list) def scan_and_promote(self, evicted_turns: Iterable[tuple[int, str]]) -> list[Obligation]: promoted: list[Obligation] = [] for turn_no, text in evicted_turns: low = text.lower() has_verb = any(v in low for v in COMMITMENT_VERBS) trigger = next((m for m in TRIGGER_MARKERS if m in low), None) # A commitment with a future trigger and no realized tool call in-span # is an open obligation that must survive compaction. if has_verb and trigger and "tool_call" not in low: ob = Obligation(source_turn=turn_no, text=text.strip(), trigger=trigger) self.entries.append(ob) promoted.append(ob) return promoted def open_items(self) -> list[Obligation]: return [e for e in self.entries if e.status == "OPEN"] def compact(evicted_turns, summarizer, ledger: ObligationLedger) -> str: promoted = ledger.scan_and_promote(evicted_turns) summary = summarizer([t for _, t in evicted_turns]) # Guardrail: every promoted obligation must be present in the artifact verbatim. missing = [ob for ob in promoted if ob.text not in summary] if missing: # Do not silently proceed; the summarizer dropped debt. raise DanglingCommitmentError( f"Compaction dropped {len(missing)} open obligation(s) at turns " f"{[ob.source_turn for ob in missing]}; refusing to evict." ) # Re-inject the live ledger so unresolved debt persists across the boundary. open_lines = "\n".join( f"[OPEN OBLIGATION turn {o.source_turn}] {o.text} (trigger: {o.trigger})" for o in ledger.open_items() ) return summary + ("\n\nOBLIGATION LEDGER:\n" + open_lines if open_lines else "") def close_obligation(ledger: ObligationLedger, turn: int, realized_tool_call: str) -> None: match = next((o for o in ledger.open_items() if o.source_turn == turn), None) if match is None: raise DanglingCommitmentError(f"No open obligation at turn {turn} to close.") match.discharge(realized_tool_call) ```