Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Learn Claude Skills. Do Everything Better.
claudeskill-me.com
LATEST
Messages API Adds On-Demand Compaction in Beta: Developers Decide When to Compact, Not the System  ·  Claude Cowork and Chat Officially Merge, Launching Claude Docs and Claude Slides Alongside It  ·  Why a Single "hi" Can Burn 20,000+ Tokens in Claude Code: Breaking Down the Fixed Startup Overhead  ·  How to Write Your First Custom Slash Command in Claude Code: A Working Example From Scratch  ·  Claude Code Merged Custom Commands Into Skills — Most "Commands vs Skills" Guides Are Already Outdated  ·  Why Your Claude Code Skill Silently Stops Triggering: The 15,000-Character Description Budget No One Warns You About
news

Messages API Adds On-Demand Compaction in Beta: Developers Decide When to Compact, Not the System

30-Second Version · For the impatient
Compaction timing is no longer the system's call — developers now decide when history gets condensed.

Full Explanation +
01 · Why did this happen?

Does this feature replace the automatic Compaction API launched in February 2026, or coexist with it?

They coexist — this doesn't replace it. The official documentation's wording is "on-demand," emphasizing an added way to trigger compaction actively that the developer controls; the original Compaction API's logic, triggered automatically based on Context Window usage, hasn't been removed or replaced. The difference lies in who decides when compaction should happen — the automatic mechanism suits situations with no clear milestone, simply approaching the window ceiling as a conversation naturally grows longer; on-demand compaction suits workflows where a developer can clearly anticipate "this is a good moment to compact," such as right after a staged task completes.

In practice, this means you can combine the two mechanisms situationally rather than choosing one or the other — though since on-demand compaction is still in beta and requires an extra beta header to enable, it's worth confirming how the two behave when layered together in a test environment first, before deciding how to use them in production.

02 · What is the mechanism?

After Compaction, if I later want to look back at the details of the content that got condensed, is there a way to retrieve it?

Per current official documentation, compaction produces a "condensed summary" that replaces the original long list of messages and is used to continue the conversation — meaning the portion of history that got condensed is, in essence, summarized rather than preserved verbatim somewhere you can query at will. This is also why the documentation specifically emphasizes that "recent turns can still be kept word for word": the recent portion, which is more likely to be followed up on in detail, isn't compacted — what actually gets condensed is the older history considered not to need verbatim preservation.

If your application genuinely needs to be able to look back at the exact verbatim conversation content at any point in time (a compliance audit scenario, for instance), it's worth confirming before deciding whether to compact a given stretch of history: once compacted, is there another channel (your own preserved original logs, for example) to verify that content separately, rather than relying entirely on the compacted summary kept on the API side as the sole record.

03 · How does it affect me?

Which models currently support this feature, and how do you check compatibility with preserved thinking?

This specific entry in the official release notes doesn't itself list an explicit model roster — it only describes the mechanism and the compact-2026-09-04 beta header. But the entry specifically notes that "on models with preserved thinking, the thinking in kept turns can stay valid" after Compaction, meaning this feature has at least accounted for how it interacts with the preserved thinking mechanism — and preserved thinking itself is a capability specific to certain newer models (Claude Fable 5.1, mentioned elsewhere in the documentation, for instance).

Since this particular entry doesn't hardcode a full support list into the announcement itself, the more reliable approach is checking the current version of the Compaction feature's documentation page directly, confirming whether the specific model you plan to use is on the supported list, rather than assuming every model qualifies — especially for a still-rapidly-iterating beta feature whose supported scope can shift at any time.

04 · What should I do?

I don't build API applications myself — I just use Claude through claude.ai or Claude Code. Is this update relevant to me?

This update is itself a Messages API-level feature, directly affecting developers building applications through the API. If you only chat through the claude.ai web interface or use Claude Code, you won't directly touch the Compaction parameter or need to set a beta header yourself — whether these interfaces adopt a similar mechanism under the hood, and whether it triggers automatically or is arranged differently, is a product-side implementation detail outside the scope of this developer-facing API release note.

That said, understanding the concept behind this feature still has indirect value: if you're working on a long-running project in Claude Code and notice a shift in response speed or coherence past some point in the conversation, that kind of phenomenon is likely related to a context compaction mechanism at work (whether automatic or, potentially in the future, manually triggered) — knowing that "compaction" exists as a mechanism, split into automatic and on-demand triggering logic, helps you recognize this kind of pattern as the system mechanism doing its job, rather than something being wrong.

Full Content +

The official Claude Platform release notes added an entry on September 14, 2026: the Messages API can now compact a conversation on the server side at a moment the developer chooses, currently open for testing under the compact-2026-09-04 beta header. This feature extends the Compaction API that's existed since February 2026, but explicitly hands control over the triggering moment from automatic system judgment back to the caller.

How it actually works

Per the official documentation, a developer adds the top-level Compaction parameter to a request, and the API returns a signed compaction Block — a summary condensing the messages just sent. On subsequent requests, sending this compacted block first, in place of the original long list of messages, is enough to continue the conversation. In other words, developers get a "pre-verified summary" they can attach at the front of later requests and reuse directly, without reprocessing the full original conversation history every single time.

Three design details worth noting

The official documentation calls out three specific technical points: first, whether and when to compact is entirely up to the developer — different from the original Compaction API's logic, where the system triggers automatically based on context window usage; second, the request can run in the background, without making users wait; third, after the compaction summary is produced, the most recent turns of the conversation can still be preserved word for word, not folded into the summary — meaning the compaction acts on the older segment of history that doesn't need verbatim preservation, while recent interaction detail stays intact. For models supporting preserved thinking, official documentation also specifically notes that if the preserved recent turns carry thinking content, that thinking content can stay valid after compaction.

How this differs from the existing Compaction API

This feature is positioned as "on-demand," emphasizing developer-led timing control rather than replacing the existing automatic compaction mechanism. For one-off workflows where a developer can clearly anticipate "this is a good moment to compact" (a long-running agentic task, say, right after completing a clear intermediate milestone), this actively-triggered approach lets the compaction action align precisely with the workflow's own rhythm, rather than relying entirely on the system's judgment based on usage ratio.

Current limitations

The official release notes clearly mark this feature as still in beta, requiring the compact-2026-09-04 beta header on requests to use it — meaning both the interface and behavior remain subject to change, and it's not recommended to treat this as a stable, finalized feature for a critical production dependency just yet. At this stage, it's worth first evaluating in a test environment how this feature interacts with existing automatic compaction logic before deciding whether to formally adopt it.

What this means for you

If you're building a long-running, multi-turn agentic application on the API, what's worth evaluating about this feature is that it turns compaction timing from "the system decides automatically" into "you can schedule it precisely" — for instance, actively condensing the earlier history right after a task hits a clear milestone, then continuing the next stage with a leaner context, instead of waiting passively for compaction to trigger once window usage crosses some threshold. If your current application already relies on the automatic Compaction API launched in February, this new feature can be treated as an additional manual control option — the two aren't mutually exclusive, and it's worth understanding each mechanism's triggering logic clearly before deciding whether to layer them together.

Sources: Claude Platform release notes - September 14, 2026, Compaction - Claude Platform Docs
Ask a Question
Please enter at least 10 characters
Related Articles
Why a Single "hi" Can Burn 20,000+ Tokens in Claude Code: Breaking Down the Fixed Startup Overhead
advanced · Sep 05
Why Your Claude Code Skill Silently Stops Triggering: The 15,000-Character Description Budget No One Warns You About
practice · Sep 02
Subagents Aren't Smarter Mini-Claudes — They Solve Isolation, Not Capability
advanced · Aug 31
Claude API Bill Suddenly Higher? Check Whether You're Using Prompt Caching — and That Quietly Changed TTL
practice · Aug 29
Related News
More Related Topics