When AI Agents Rewrite Their Own Context: The Security Risk of Compaction

AI agents are increasingly designed to work across long-running tasks. They read files, call tools, inspect repositories, browse the web, execute code, interact with APIs, and continue working long after the original conversation has become too large to fit inside the model’s context window. To keep those tasks alive, agent systems use compaction. The basic […]





