September 17, 2026: Anthropic has added Claude API on-demand compaction in beta, announced in its September 14 platform release notes. Applications can choose when to summarize conversation history, run that request in the background, and retain recent turns verbatim. Source: Claude Platform release notes.

What changed

The new path uses the compact-2026-09-04 beta header and a top-level compaction parameter. The API returns a signed summary block rather than a conversational reply. Subsequent requests place that block before the remaining turns, replacing the messages it summarizes.

This differs from threshold-based compaction, which runs when context reaches a configured size. The on-demand option lets an application choose a checkpoint while its conversation continues.

Availability and integration boundaries

Anthropic documents on-demand compaction for the Claude API, excluding Amazon Bedrock and Google Cloud. Send the beta header both when requesting the summary and when reusing its signed block. Keeping the summarized messages before that block produces a 400 error, and a request cannot combine compaction with context_management. See the official on-demand compaction guide.

Why this matters for QA engineers

A regression-triage agent may accumulate logs, failed hypotheses and tool results over many turns. Choosing a summary checkpoint could make these workflows easier to manage, but the useful question is whether the agent still retains the evidence needed for its next decision.

Our recommended evaluation: replay a representative failing-test investigation before and after compaction. Check that the agent retains the failing assertion, environment, unresolved questions and links to original artifacts. Keep raw logs outside the conversational summary so conclusions remain auditable.

Also test a background summary that finishes after new tool results arrive: those newer turns should survive the swap without duplication or omission. Add a negative API test for incorrectly retained summarized messages. Measure outcome accuracy and latency before adopting the beta in unattended CI triage; the announcement does not establish a QA-specific performance gain.