Pattern
Server-side compaction
Keep a long-running agent inside its context window by having the API replace older turns with a provider-written summary, triggered on demand or at a token threshold, instead of writing and maintaining a summarization loop in the application.
Classification Letting the model provider summarize older turns of a long agent run on the server, with rule-based clearing of old tool results alongside it.
Full entry
The complete treatment — problem, how it works, when to use it, sources, and examples — lives in the volume below.
Browse the full pattern index or the catalog.