Long-running AI agents build up more text than their fast memory can hold. Systems discard older pieces, but keeping a needed piece does not guarantee the model can use it: its internal position can make it hard to retrieve.
PACE combines a key-value (KV) cache, the model’s fast store of past text, with a planner that predicts which earlier details later steps will need. It also renumbers stored text so its internal position stays close to the current step, helping the model connect relevant words.
On fresh coding tasks, it passed 97% of hidden checks, versus 42% for a common eviction method. The result shows that limited-memory agents need not only preserve useful history but keep it accessible, a distinction that can improve how such systems are designed and tested.
