Claude's Messages API compacts context on demand in one call

A beta returns a signed summary block you swap in for old turns, so agents run past the ~200K context limit with no client-side summarizer to keep.

Nowline SEP 16 7:00 AM banner

Top AI stories from the last hour

Top AI stories from the last hour

Copy markdown

  • One request, one signed summary block

    The `compact-2026-09-04` beta adds a top-level `compaction: {type: "summarize"}` parameter. Claude replies with a single signed compaction block; you append it in place of the summarized turns and keep going — no client-side truncation logic to write or maintain.

  • Runs past the 200K ceiling, and replays are free

    Compaction extends effective context well beyond the fixed ~200K window for long agent runs, and re-applying a saved compaction block on later requests incurs no additional cost. One third-party writeup reports ~58% fewer input tokens (200K down to 82K) in testing.

  • The catch: same-model summaries, images dropped

    Summarization uses the same model and bills as an extra sampling step (visible in usage.iterations). You cannot combine it with context_management edits on one request, and images or documents in summarized turns are lost — restate them afterward.

  • Where it runs

    Supported on Opus 4.6-5, Sonnet 4.6/5 and Fable/Mythos 5.x, across the Claude API plus AWS Bedrock, Google Vertex and Microsoft Foundry — all still in beta, so expect the shape to change before GA.