Posts

Showing posts with the label context management

Context Compaction and Rolling Summaries for Long-Running LLM Agents in September 2026: Keep Tool Loops Under Your Context Budget

Image
Long-running LLM agents burn context fast. A support agent that opens tickets, searches docs, calls CRM tools, and retries failed side effects can fill a 128K window in a few dozen turns. When the window fills, the model starts dropping early instructions, tool schemas, or the original user goal. Context compaction is the practice of deliberately shrinking the active prompt while preserving what the agent still needs to finish the job. Image: mikemacmarketing / photo on flickr via Wikimedia Commons (CC BY 2.0) Image: Midjourney; prompt suggested by Grok via Wikimedia Commons (Public domain) This is not the same as a durable agent memory store. Memory systems (vector stores, Redis session state, AgentCore-style profiles) keep facts across sessions. Compaction is an online budget control for the current run: you rewrite or summarize the in-flight transcript so the next model call still fits, stays coherent, and does not invent lost details. Why rolling context brea...