Automatic Compaction: How Shelley Keeps Going and Going Without Losing the Plot
Blog post from exe.dev
Shelley addresses the rising cost and declining quality risks of long LLM agent conversations through automatic context compaction, which shortens accumulated message histories while retaining relevant information. Because agent loops repeatedly send the full conversation, including often lengthy tool outputs, context growth creates a roughly quadratic cost curve; Shelley therefore prompts the model near a configurable 200,000-token threshold to use a compaction tool. The tool lets the model trim selected tool results and rewrite groups of prior messages into shorter linked summaries, with a linter checking whether the proposed reduction is appropriate before the conversation proceeds. Compacted material remains available in SQLite for later retrieval, while the model receives a seamless rewritten history without visible compaction artifacts. This third version replaces earlier approaches that started new conversation generations, and recent use suggests it can keep lengthy conversations near the token cap while enabling more natural, exploratory agent interactions, with auto-compaction now enabled by default.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.