Long-running AI agents now have a smarter way to forget.
Researchers have proposed Self-GC, a context management system for large language model agents that handle extended, multi-step tasks. Instead of relying on blunt heuristics — like dropping the oldest messages or summarizing everything near a context limit — Self-GC treats each user turn, tool result, and skill state as an indexed object with a lifecycle. A side-channel planner proposes what to fold, mask, or prune; a harness enforces those decisions while keeping recoverable copies. The result: the agent sheds dead weight without accidentally discarding something it will need later.
The numbers are meaningful. On a 33-session hard test set, Self-GC pruned 43.95% of prefix tokens while leaving 84.85% of future continuations unaffected — well above the 54.55% to 69.70% no-impact rates from heuristic baselines. On a larger 332-session production-derived suite, the system reached no-impact rates of 91.27% to 94.58%, versus 77.71% to 87.46% for baselines. In a live online split, it cut daytime average input tokens by 10% to 15%, with peaks near 20%.
Context windows have grown enormous — Gemini 1.5 and others now offer millions of tokens — but raw capacity doesn't solve the problem of what to do with a sprawling agent state mid-task. Stuffing everything in and hoping the model attends to the right parts is expensive and error-prone. Self-GC is a bet that agents need runtime lifecycle control, not just a bigger bucket.
Self-governing memory sounds appealing until you remember that the planner deciding what to prune is itself an LLM — so the system's reliability ultimately rests on one model trusting another to not throw away the wrong thing.