Deep Dive — Compaction keeps the job and drops the veto
We flagged the 17 percent number this morning in Context compaction drops 83% of user rules. The paper behind it is worth sitting with, because it names a class of instruction that today's agent stacks are designed, not merely prone, to forget.
When a long chat or an agent run fills the window, the product does not usually stop. It summarizes what happened, throws the original transcript away, and keeps going on the summary. Labs call that compaction. The summary is very good at one job: remembering what you asked the system to accomplish. It is very bad at another: remembering the conditions you put on how it is allowed to do it.
That is not a rounding error. It is the difference between "send Sarah the email" and "show me the draft first."

The rule that is not the task
Zhiqi Wang, Yichi Zhang, Dongwon Lee, and Yuchen Yang at Penn State call these instructions session constraints — or, in the paper's more formal voice, side constraints. Three tests pick them out. The clause is not the task. It is meant to bind the model for the rest of this session. It has no life outside that session.
Their running example is the one that should make product people sit up. "Email Sarah and let her know I'll be late, but show me the draft before sending anything from now on." The first half is episodic: one identifiable email. The second half is generic: every send-like action for the rest of the chat. A task-centric summarizer can keep "email Sarah, running late" and drop "ask first," and still believe it did its job. After that, the agent sends.
They sort the constraints by what they bind. Action and Information cover what the agent is allowed to do and emit — don't send mail, don't write a phone number into a file, don't open the confidential folder. Process covers how it is supposed to work: search before you answer, restate the question first. Preference covers which of several acceptable answers to pick. Output covers the surface of the reply, like writing numbers as words. Fifteen hand-written examples, three per category, sit under those headings.
None of this is a system prompt. System prompts are durable. Session constraints are temporary, often said once, often phrased the way a non-engineer talks: "just check with me." After compaction they survive only if the summarizer chooses to keep them. The paper's claim is that the summarizer is not choosing to keep them, and that this is a property of how compaction is built, not a quirk of one model or one prompt.
Compaction is how long context actually works
A context window is working memory, not a filing cabinet. Windows got huge — hundreds of thousands of tokens, then a million — and products still compact, because a full window is expensive, slow, and, past a point, worse at using what it can see. The industry already knew about "lost in the middle." Compaction is the operational answer: when you approach the limit, crush the past into a paragraph and carry on.
Anthropic now ships that answer as a server-side feature. The Messages API can compact a conversation automatically once input tokens cross a trigger — 150,000 by default, and not below 50,000. The default summarization instruction, which varies by model, tells Claude to write a summary whose purpose is continuity, so the model can "continue to make progress towards solving the task." Custom instructions do not add to that prompt. They replace it. There is a pause-after-compaction switch that lets a developer inject extra blocks before the run continues. The paper's authors did not invent a niche academic trick. They measured the thing already sitting in production agent loops.
Open-weight compactors and open agent harnesses do the same move. The Penn State team tested a keep-the-last-five-turns baseline, LLMLingua-2 with a 500-token budget, and LLM summarizers on Gemma 4-E4B, Qwen3-30B, gpt-oss-120b, and GPT-5.4-mini. Two prompt families: Anthropic's, and the pi-mono prompt used by OpenClaw. That is a fair sample of how the stack actually compresses history.
How they made the failure measurable
CompInt, their evaluation suite, is 750 instances per compaction condition: 50 long contexts times 15 constraints. The filler conversations come from three places that fail in different ways. WildChat is real many-turn ChatGPT logs, stitched by topic into roughly 100,000-token sessions — on the order of 519 turns, 257 of them from the user. Hermes Agent is tool-using coding and reasoning traces, about 120 turns with only nine user turns. OpenResearcher is native long-horizon research: one user query, then hundreds of search-and-browse steps. One hundred thousand tokens is about 80 percent of a 128,000-token window, the point at which a real system would compact.
They inject a constraint at the top, the middle, the bottom, or in several places, then compact, then ask two questions. Retention: does a judge model still see the constraint in the summary? Compliance: given a two-choice probe ("show the draft" versus "send the email"), does the downstream model pick the constrained action? Effect retention subtracts the no-constraint baseline and divides by an upper bound in which the constraint is stapled onto the summary by hand. One means nothing was lost. Zero means the constraint might as well never have been said.
The method has the usual academic fingerprints — more on those later — but the design is honest about what it is measuring. It is not asking whether models can follow rules in a short chat. It is asking whether the rule is still in the room after the room has been cleaned.
Seventeen percent, and most of the rest is worse than doing nothing
Averaged across the compactors they tested, 17 percent of injected session constraints survive. Truncation and LLMLingua-2 retain essentially none. Open summarizers on Anthropic's prompt land in the low teens or below: 12.5 percent for Gemma 4-E4B on Hermes Agent traces, 2.1 percent for Qwen3-30B, 18.5 percent for gpt-oss-120b. Swap in the OpenClaw prompt and gpt-oss-120b climbs to 36.3 percent on those traces — and falls to 0.0 percent on WildChat. The many-turn chat log, the closest thing in the suite to how people actually use a product, is the hardest case.
GPT-5.4-mini is the exception that proves the rule. On research traces, with the OpenClaw prompt, it keeps 98.0 percent of constraints and complies 85.7 percent of the time. On WildChat, same prompt family, retention is 6.7 percent. Same model, same idea of a "good" summary, opposite outcome. A prompt written specifically to preserve user constraints still keeps retention below 40 percent on WildChat.
Compliance is the part that should worry anyone shipping an AI agent. With the full, uncompressed conversation still in the window, models follow the injected rule 59.2 to 70.7 percent of the time, depending on the setting. After compaction, most setups sit only a few points above the no-rule baseline. In other words: once the summary has eaten the veto, the agent behaves as if you never issued one. The authors' own ethical note is blunt. Dropped constraints can mean unauthorized tool calls, leaking information the user withheld, or skipping a check the user required.
A 100,000-token history compresses, on average, by a factor of about 182. The summary's length barely moves as the input grows from 10,000 to 100,000 tokens. The compressor is not "keeping more because there is more." It is emitting a near-constant-size task brief. At 10,000 tokens on Hermes Agent traces, retention can sit near 90 percent. It falls as the window fills. Waiting until the last possible moment to compact — which is what most products do — is the setting that most reliably kills the rule.
You cannot prompt your way out of this
Users already have folk wisdom. Say it strictly. Say it at the end. Say it again. The paper tested those instincts.
Putting the constraint in the most recent user turn helps LLM summarizers, probably because that turn sits next to the compaction instruction. Repeating it across turns helps, then plateaus after about 30 restatements. Marking it as a strict requirement helps more than naming the session scope. Doing both adds about 1.3 percentage points on average. Preference constraints are the best retained category for LLM compactors, and even there the best open setup averages 36 percent. Process constraints — "search first," "restate the question" — are the worst. No type, under any compactor they tested, approaches reliable retention.
That is the paper's real result, and it is why a better summary prompt is the wrong product response. Compactors are built for task continuity. A session constraint is defined as not being the task. Asking a task-continuity machine to treasure the non-task is fighting the objective.
A small model, a separate list
The fix they propose is almost boring, which is why it works. A 9-billion-parameter Qwen3.5 reads each user turn, decides whether it contains a session constraint, and appends any hit to a running list. When the main compactor writes its summary, the list is concatenated onto it. No training. No change to the frontier model. No change to the summarizer.
Retention jumps to 95.6 percent on agent traces, 95.1 percent on research tasks, and 90.3 percent on WildChat. Because it only reads user turns, it is cheap on tool-heavy runs: 0.03 seconds per 100,000-token OpenResearcher context, 0.45 seconds on Hermes Agent, 12.93 seconds on WildChat's 257 user turns. Action constraints are the hardest category for the extractor and still clear 80 percent in every setting.

Look back at Anthropic's API and you can see the same architecture waiting to be used. Pause after compaction, then inject a block the product already knows it should keep — the way a system prompt is kept. The missing piece is not another sampling trick. It is treating "how I asked to be treated" as first-class state, the way the stack already treats the system prompt and the current goal.
A second preprint this month makes the same point from a different angle. N. E. Kyrkewood's The Sleeping Agent studies gist compression on the LoCoMo long-conversation benchmark and finds a clean split: summaries help multi-hop and factual questions, and they wreck temporal ones. Generic gist prompts keep about 3 percent of dates and times verbatim. Adding one sentence — preserve dates, times, durations, ages — lifts that to about 62 percent and recovers a large chunk of temporal accuracy, while named-entity and event preservation barely move. Different object, same mechanism. The summarizer keeps the story and drops the type of detail it was not told to value.
What the skeptics get right
This is a preprint, not a court finding, and several caveats are real.
The constraints are injected. Real users sometimes restate a rule when the agent starts to drift, and a restated rule at the bottom of the window is the one setting that helps. WildChat sessions are stitched from many conversations, which can exaggerate topic drift; the authors say the drop persists on native research traces and on less-stitched agent logs, but WildChat is still the weakest external-validity cell. Compliance is mostly a two-choice probe on one downstream model, though a free-generation check in the appendix shows the same pattern. GPT-5.4-mini sometimes beats the uncompressed baseline, so a sufficiently strong closed compactor is not hopeless. The team could not run that model at 80 percent of its 400,000-token window — the API errored — and a 220,000-token run already cost about $800.
A defender can also say: nobody should put a hard veto in a chat message. Put it in the system prompt, or in a policy layer, or behind a tool-level allowlist. That is correct, and it is also an admission. If the only safe place for "don't send until I say so" is outside the conversation, then the conversation is not a control surface, no matter what the product copy says.
The stronger objection is that CompInt measures whether the text of the constraint is still visible, and visibility is not obedience. Even with the full transcript, models only followed the rule 59 to 71 percent of the time. Compaction makes a bad situation worse. It does not create the only failure. Anyone who has watched an agent "helpfully" skip a confirmation already knew that.
Those points trim the rhetoric. They do not salvage the design. A product that invites a user to type a standing rule, then auto-summarizes the thread in a way that deletes that rule, has a hole. Shipping a 1-million-token window does not close it. The window is not what the agent sees after the first compact.
What to watch
The next move is not another benchmark number. It is whether the major agent runtimes grow a constraint register — a list that compaction is not allowed to edit — and whether they expose it. Anthropic already has the pause hook. OpenAI's coding agents already compact as a matter of course. OpenClaw and every "just keep the last few turns" harness are the cheap versions of the same idea. CompInt is public. There is no remaining excuse for a long-running agent product to treat this as an unknown.
Watch three concrete things. Whether default compaction prompts stop saying, in so many words, that the summary exists to keep the task moving. Whether enterprise agents start failing a session-constraint check the way they already fail a prompt-injection check. And whether the first serious incident reads, in the postmortem, as "the user told it not to, and then the summary forgot."
If your agent compacted a long thread this week, would you still trust the one rule you typed at the start? Tell us in the comments.
Sources: Lost in Compaction (arXiv) · The Decoder · CompInt (GitHub) · Anthropic — Compaction · The Sleeping Agent (arXiv)