Claude API Adds On-Demand Conversation Compaction to Messages API
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'.
https://platform.claude.com/docs/en/release-notes/overview
Related releases
- Anthropic Python SDK v1.6.0 Released with AI Tooling & API Enhancements Anthropic Python SDK Releases ·
- Anthropic adds Salesforce plugin to Claude in beta Claude Release Notes ·
- Anthropic Claude claude-haiku-4-5-20251001 reaches end of life in 30 days endoflife.date ·
- Anthropic's Claude Code v2.1.272 Delivers Bug Fixes and Reliability Improvements Claude Code Releases ·
- Anthropic Claude Code v2.1.271 Enhances Fast Mode, Sandboxing, and Fixes Bugs Claude Code Releases ·
- Anthropic's Claude Code v2.1.270 fixes Git command permission bug Claude Code Releases ·