Claude API can compact a conversation on demand, in beta
The Messages API can now compact a conversation on demand on the Claude API, in beta. The API returns a signed compaction block that summarizes earlier messages, and later requests send it in their place.
Why it matters
Long-running agents on the Claude API can keep sessions going without writing their own context trimming.