Four questions before forgetting
AI agents today compress their own working notes whenever a token counter says so, and researchers at Johns Hopkins and Apple got better results by instead having the agent answer four yes-or-no questions about where it is in the task.
Ask a capable AI model whether now is a good moment to compress its own working notes and it answers worse than a stopwatch does. Hand it four specific questions instead and it beats the stopwatch. The questions: did I just close out a self-contained step, can that step be boiled down to a few citable facts, am I making progress, am I stuck?
Nearly every agent framework already has a step where it compresses what it remembers. Almost none of them ask the agent what it is in the middle of.
Agents that run for hours pile up every page they read and every command they ran, until the heap outgrows what the model can hold at once. The shipped fix, in the coding assistants people actually use, is a token counter: cross some fraction of the window and summarize, whatever the agent happens to be halfway through. Tianjian Li and colleagues gave the model a summarize button plus the checklist and let it fire on its own judgment. Across six benchmarks and seven freely downloadable models, that beat the timer by up to 18 points on competition maths and 5 to 9 points on open-ended web research, at 30 to 70% lower cost per question.
Strip the checklist back to a bare yes-or-no ask about whether to compress now, and the gain disappears. On the web-research tasks the method then loses to the timer it was built to beat, answering 41.0% of questions correctly against the timer's 41.5%. The judgment lives in the four questions, not in the model's sense of its own state: unprompted, these systems cannot tell when their own context has gone stale.
Plenty is left on the table. The authors compute that an agent which simply skipped summarizing whenever it was already right would score 53% where this scores 45%, so the checklist catches some of the available gain and not most of it. Every result here is on maths and search problems with freely downloadable models, too, with nothing yet from a coding agent or a big commercial one. But the shape of the fix travels cheaply: it is four sentences of prompt rather than a retrained model, and it relocates a familiar kind of long-running agent failure from the model not being clever enough to the scaffolding having interrupted it at the wrong moment.
The paper links an MIT-licensed repo where the four checks sit in a single prompt file, short enough to drop into an agent loop you already run.
Read the paper at arxiv.org →The lenses
The facts
How this connects
Tap a node to open it