anthropic Claude Platform Release Notes ·

Claude API Adds On-Demand Conversation Compaction to Messages API

aipreviewengineer
feature

Anthropic has introduced an on-demand conversation compaction feature to its Claude API, now available in beta through the Messages API. Developers can trigger summarization of message history by sending a top-level `compaction` parameter, receiving a signed block to use in subsequent requests. This capability offers flexibility to choose when to compact conversations and allows retaining recent turns verbatim, potentially preserving 'preserved thinking' validity for applicable models. It is currently in beta, requiring the `compact-2026-09-04` beta header.

Features (1)
  • On-demand conversation compaction for Messages API

    The Claude API now supports on-demand conversation compaction within the Messages API, accessible in beta using the `compact-2026-09-04` beta header and a top-level `compaction` parameter. This feature returns a signed `compaction` block that summarizes prior messages, which can then be sent in place of those messages in subsequent requests. It offers flexibility to compact conversations when needed and can preserve the validity of thinking in uncompacted recent turns for models with 'preserved thinking'.

Read the original announcement →

https://platform.claude.com/docs/en/release-notes/overview

Related releases