Claude On-Demand Compaction Needs a Citation-Retention Test
Use a six-case release gate to test whether Claude on-demand compaction preserves source IDs, claim links, contradictions and recent turns.
Claude’s new on-demand compaction can replace an older conversation with one signed summary block while leaving recent turns unchanged. That gives long-running agents more control over context, but it also creates a new release question: did the summary preserve the source IDs, quoted claims and uncertainty the next turn still needs?
Anthropic documents the API contract. It does not report a citation-retention rate. The safe response is to test the exact workflow before treating compaction as lossless memory.
The signed block replaces the history you send
On-demand compaction uses the compact-2026-09-04 beta. The application sends a top-level compaction parameter with the messages it wants summarized. The response contains one signed compaction block and no normal reply.
On later requests, that block must appear first in messages, replacing the messages it summarizes. Anthropic says:
- send the beta header on the compaction request and every later request carrying the block;
- keep the block exactly as returned, including its signature;
- send exactly one compaction block per later request;
- remove summarized messages, because leaving them in front of the signed block returns a 400 error;
- place any unsummarized recent turns after the block.
This differs from threshold compaction. Threshold compaction happens inside an ordinary request after a configured token trigger. On-demand compaction is a separate request the application schedules itself.
Treat the swap as a state transition
full_history
-> select older prefix
-> request signed summary
-> continue on full history while it runs
-> receive compaction block
-> replace exactly the submitted prefix
-> keep newer tail unchanged
-> run a retention check
-> continue or restore the full checkpoint
The application should save the pre-compaction checkpoint until the first post-swap request passes. A valid signature proves that the block came through the API contract. It does not prove that every fact your workflow cares about survived the summary.
For a research or SEO agent, the minimum durable state usually includes source URL, source title, retrieval time, claim supported, quotation boundary, contradiction state, and any rule that prevents publication. Put those requirements in the compaction instructions and verify them afterward.
Six cases that expose silent evidence loss
| Case | Evidence planted before compaction | Pass condition after compaction |
|---|---|---|
| Single source | One URL supports one claim | The same source and claim relationship is recovered |
| Competing sources | Two sources disagree on one number | The disagreement remains explicit |
| Negative evidence | A source says a feature is not supported | The later answer does not turn absence into availability |
| Version boundary | Old and new documentation use different contracts | The active version and date remain attached |
| Keep-tail citation | A recent unsummarized turn adds a source | The tail stays verbatim and the older summary remains available |
| Tool interruption | Tools are defined during summary creation | A null summary is rejected instead of entering production history |
Anthropic documents an occasional threshold-compaction failure where a model calls a tool during summarization and returns a compaction block with null content. The on-demand path has a different contract, but applications should still reject an empty or malformed block rather than assuming the signature alone makes the payload useful.
Score recall and distortion separately
A compact summary can mention a source while changing what it supports. Count more than URL survival:
source recall = required source IDs recovered / required source IDs planted
claim support recall = supported claim links recovered / links planted
contradiction recall = preserved conflicts / conflicts planted
distortion rate = materially changed evidence statements / statements checked
For example, if a fixture contains eight required source IDs and the post-compaction agent correctly retrieves seven, source recall is 87.5%. If it preserves all eight URLs but reverses one source’s conclusion, URL recall is 100% while evidence fidelity is not.
Download the citation-retention test sheet (CSV). Every included row is marked EXAMPLE-REMOVE; it is a test fixture, not a measured Claude result.
A practical release gate
- Freeze the model ID, beta header, system prompt and non-deferred tool definitions.
- Save the full conversation checkpoint and the exact prefix sent for compaction.
- Ask the summary to retain source IDs, claim links, contradictions, dates, open questions and stop rules.
- Validate that the response contains one non-empty signed block.
- Swap only the submitted prefix and keep newer turns in order.
- Run the six fixture cases and record repeated trials, not one screenshot.
- Restore the full checkpoint if any publication-critical evidence is missing or distorted.
The Claude search-result blocks guide shows how to preserve citation provenance in first-party retrieval. The citation-quality test explains why answer success and source quality need separate scores.
Official documentation
Anthropic announced on-demand compaction on September 14, 2026. See the Claude Platform release notes and compaction guide. SearchEngineAnswer has not run the API fixture yet, so this article publishes a test and release gate, not a retention result.
Keep learning
Continue this topic
Next in this topic
OpenAI Plans to Retire Custom GPTs: Build the Migration Inventory
Earlier in this topic
Cloudflare Browser Run Guardrails: Build a Safe Hostname Allowlist
Tools & Workflows
Ask a question or join the discussion