Compaction API launches in beta for server-side context summarization
A beta compaction API lets the server summarize and replace older context as a conversation approaches a threshold, so agent loops can run past the context window without client-side truncation. Available on `claude-opus-4-6` at launch.
What does this mean for me?
Engineering leadership
Cost, risk, timeline, team impact Worth knowingServer-side compaction removes the need to build and maintain your own truncation logic for long agent runs, which is a chunk of harness code you can delete. Evaluate it on one long-running agent while it is still beta and Opus 4.6-only.
Engineer
What to change, what breaks, what to test Worth knowingEnable the beta compaction API on `claude-opus-4-6` and set a threshold; the server summarizes and replaces older turns so loops can run past the context window. Retire your own truncation or summarization code once you have verified the summaries preserve what your agent needs.
General consumer
Using the Claude apps, not the API No impactNothing to do — this is a developer feature, though it is the same idea behind long chats in the apps continuing instead of ending.
The compaction API moves context management onto the server: when a conversation approaches a configurable threshold, older turns are summarized and replaced automatically, allowing effectively unbounded conversations and long-running agent loops.
At launch it was in beta and available on claude-opus-4-6 only. It is the server-side counterpart to the client-side compaction helper shipped in the Agent SDK in November 2025, and it changes the design of any harness that previously did its own truncation or summarization.
API surface
| Parameter | Change | Breaking | Models |
|---|---|---|---|
compaction | added | no | claude-opus-4-6 |
Terms on this page: Context window