Back
AnthropicClaude API
The Messages API can now compact a conversation on demand on the Claude API, in beta with the…
AI summary
Written by AI from the official notes. Check them for exact details.The Messages API now allows users to compact conversations on demand, and new thinking-binding controls have been added.
- Messages API can compact conversations on demand with a new parameter.
- Return a signed compaction block summarizing sent messages.
- Keep recent turns word for word after compaction.
- New entry type for input transformations helps track thinking mismatches.
Why it matters: Developers using the Claude API should care for improved conversation management and tracking of thinking mismatches.
Full release notes2 changes
- The Messages API can now compact a conversation on demand on the Claude API, in beta with the
compact-2026-09-04beta header. Send the top-levelcompactionparameter, and the API returns a signedcompactionblock that summarizes the messages you sent. On later requests, send that block first, in place of those messages. You choose when to compact, the request can run in the background, and you can keep recent turns word for word after the summary. On models with preserved thinking, the thinking in those kept turns can stay valid. - With the
thinking-binding-controls-2026-08-01beta header, theinput_transformationsresponse field gains a second entry type,thinking_mismatch_allowed. It names a thinking block that failed the prefix check on a request where the API doesn't enforce that check: on Claude Fable 5.1, for example, a request from an account created before August 31, 2026, withprefix_mismatch_behaviorunset. The block still reaches the model unchanged. Log these entries to find history edits in production traffic before you opt into enforcement. See Set the mismatch behavior and readinput_transformations.