Context selection is a policy that can be measured
Five papers treat the context an agent receives as a selection policy that can be measured: what to keep, what to render, what to disclose, and which records a decision depends on.
Research track
TL;DR
- The model in most agent systems has fixed weights during a run. What changes is the context it is handed: stored lessons, earlier turns, retrieved records. Choosing that context is a policy, and recent work measures policies against each other instead of arguing for bigger windows.
- Randomized Block Curation keeps or drops blocks of an agent's own lessons by measured effect on practice tasks. It scored 66.9 on average, against 55.5 for the whole uncurated playbook, 54.1 for no playbook, and 53.8 when the agent judged its own lessons ¹.
- APDMem stores conversation history in four layers and reads them top-down, drilling into finer evidence only when a query needs it. On LongMemEval it held strong performance while accessing 8% of stored conversations ².
- ReFold folds the rendered context between turns and can undo any fold. It reported up to 2.5x fewer tokens, half the KV-cache per session, and up to 92% of forced compactions avoided under capped budgets, with no loss in task success on five benchmarks and two frontier models ³.
- MemoType rests on a proof: in a mixed store, any single retrieval strategy has an upper bound on expected precision. Routing by type improved Recall@1 by up to 16.18% across three datasets ⁵.
- We ran the curation experiment ourselves. Measured and judged curation both reached 100% on our first model, so our adoption bar was missed. On a second model the judged arm fell to 0% when its tagging output failed, and the measured arm stayed at 100%.
How we got there
An agent's store grows in one direction: lessons accumulate after tasks, turns accumulate inside tasks, records written for one job get reused as premises for the next. The default response is to hand the model more of it. The five papers in this post each refuse that default at a different point: which lessons survive, how much of a store a query sees, what the model is shown from its own history, which records a pending decision depends on, and whether one retrieval rule can serve a mixed store.
An agent judging its own lessons scored below having no lessons at all
Pham and colleagues start from an instability in self-written memory ¹. Systems such as ACE and Dynamic Cheatsheet keep a playbook of lessons the agent writes after each task and reads back in its prompt. The same growth procedure can produce a playbook that helps or one that falls up to 69.6 points below no playbook. The weak step is the judging: judging a lesson requires comparing episodes run with it against episodes run without it, and the agent only ever sees the episodes that used it.
Randomized Block Curation replaces judgment with a randomized experiment on practice tasks kept apart from the evaluation tasks. Related lessons are grouped into blocks large enough to move success measurably. On each practice task, every block is included or left out at random, so the success gap between tasks with and without a block estimates that block's effect, and the blocks that help are kept.
Across two memory systems, three models, and three benchmarks, the randomly curated lessons scored 66.9 on average, against 55.5 for the whole uncurated playbook, 54.1 for no playbook, and 53.8 for curation by the agent's own judgment. The ordering matters more than the gap: handing over everything beat having nothing by a small margin, and pruning by judgment scored below the empty store.
A store read top-down can answer while touching a small fraction of what it holds
APDMem treats disclosure as the policy ². Conversation history is stored in four progressively detailed layers: thematic summaries, personalised key facts, turn-level evidence notes, and the raw messages. A controller reads the coarse layers first and drills into finer evidence only when the query needs it. A simple query can stop at the summaries; a temporal, multi-hop, or exact-evidence query goes deeper. A synthesizer then consolidates the retrieved facts, orders events, and flags contradictions before the answer is generated.
On LongMemEval, APDMem held strong performance while accessing 8% of the total conversations. Flat retrieval spends the same on easy and hard queries; progressive disclosure makes the spend depend on the query.
Folding finished turns is safe to automate when every fold can be undone
ReFold works one stage later, on the history the current task is generating ³. A long-horizon agent re-sends its whole interaction history at every step, so cost grows until the session exceeds the window. ReFold is a training-free rendering layer that leaves the stored history untouched and compresses only what the model is shown. Content an earlier turn already displayed is replaced by a stub. Turns the agent itself reports finished are collapsed into a one-line note.
Every removal is reversible: a wrong fold costs one restore from the preserved history, so the layer needs no predictor of what will matter later. Across five long-horizon benchmarks and two frontier models, ReFold reduced token consumption by up to 2.5x and halved the KV-cache memory per session, with no degradation in task success. Under capped budgets it avoided up to 92% of forced compactions, the emergency summaries a harness writes when the window fills.
Which records a decision depends on can be measured before the agent acts on them
StateWise addresses a failure the other papers assume away: stored records that were true when written and have since been invalidated by a change in the environment or the requirements ⁴. The agent retrieves them correctly and acts on a false premise. Screening the retrieval does not help, because the record is genuinely the relevant one.
The method finds the records worth checking by counterfactual replanning: one stored record at a time is changed, with the other planning inputs held fixed, and the proposed action is watched. Records whose change moves the action are decision-critical, and their current validity gets established through reliability checks, read-only verification of observable facts, and targeted questions about developer-owned intent. On 150 executable coding-agent cases, under corrupted persistent state, StateWise reached 93.3% overall correctness against 38.7% for the baseline agent, with no unsafe actions. The selection policy here is an audit budget: checking every record before every action is too slow to run.
A single retrieval strategy has a proven ceiling in a mixed store
The MemoType paper supplies the reason routing exists at all ⁵. Its authors classify memory into three types: episodic, personal semantic, and general semantic. They built TriMEM, a dataset of 6,000 samples with type annotations, and MemoType, a framework with a learned router that classifies each memory and each query by type and applies the retrieval strategy fitted to that pairing, followed by a pruning step that removes irrelevant material from what was retrieved.
The central result is the proof. Any single retrieval strategy is subject to a fundamental upper bound on its expected retrieval precision in a multi-class corpus. Across three datasets, routing by type improved Recall@1 by up to 16.18%.
The four candidate policies, side by side:
The same comparison in text form:
- APDMem ²: acts at query time, over the long-term store; selects how deep to read, summaries first and finer layers on demand; reported result is strong LongMemEval performance while accessing 8% of stored conversations.
- ReFold ³: acts between turns, over the current task's history; selects what to render, with repeated content stubbed and finished turns folded, all reversible; reported result is up to 2.5x fewer tokens, half the KV-cache, up to 92% of forced compactions avoided, and no task-success loss.
- Randomized Block Curation ¹: acts between tasks, over the agent's lesson store; selects which blocks of lessons to keep, by measured effect on practice tasks; reported result is 66.9 average success, against 55.5 for the whole playbook and 53.8 for agent-judged curation.
- MemoType routing ⁵: acts at retrieval, over a mixed-type store; selects which retrieval strategy to run, by memory and query type; reported result is up to 16.18% improvement in Recall@1 on three datasets, and single-strategy precision is provably bounded.
Figure 1. Average success on practice tasks for four ways of handling an agent's self-written playbook. Look at the last two bars: no playbook (54.1) sits above the agent's own judgment about which lessons to keep (53.8).
The same numbers as a list:
- Randomly curated lessons: 66.9.
- Whole uncurated playbook: 55.5.
- No playbook: 54.1.
- Agent-judged curation: 53.8.
What this means for our work
We build agent systems that keep lessons between tasks. We ran our own version of the experiment in October, with a planted playbook and four arms: no playbook, the whole playbook, curation by the agent's judgment, and curation by randomized practice measurement, scored on 18 tasks. Our frozen adoption bar required the measured arm to beat the judged arm by 5 points.
On the first model, both curation arms reached 100% and the other two arms scored 0%, so the bar was missed on a tie. The tie has an explanation: in our fixture, the agent's tags matched the blocks' measured effects at 0.956, where the paper reports 0.21 for self-tags. Our lessons were synthetic and cleanly separable by reading them.
On a second model, the judged arm's tagging output failed to parse, it kept no lessons at all, and it scored 0%. The measured arm reproduced its curation and stayed at 100%, the only arm that succeeded under both models. The judged arm was cheaper when it worked: 304.2 tokens per successful task against 999.6 for the measured arm.
We did not adopt randomized curation, because the frozen bar said a partial result does not count. What we took from the run is a placement rule: an agent's opinion about its own context is an input to a policy, never the policy itself. Where the stakes justify the spend, the policy measures; elsewhere it records what judgment chose, so a later measurement can grade it.
One reservation applies to the whole set: each system was evaluated by its own authors, on benchmarks they chose or built. The shared direction, five groups at five stages of the same pipeline, is the stronger evidence.
References
- "Reliable Memory from Unstable Growth: Curating Self-Written Agent Playbooks with Randomized Experiments" — Pham, H., Nguyen, C.-D., Le, D., Srey, P., Luu, A. T., arXiv:2610.18427
- "APDMem: Agent-Controlled Progressive Disclosure for Query-Adaptive Long-Term Memory" — Fu, C.-L., Kulkarni, A., Ni, H., Madahian, B., arXiv:2610.02472
- "ReFold: Training-Free Reversible Inter-Turn Context Folding for Long-Horizon Agents" — Su, Y., Tian, J., Zhang, Z., Kundu, S., arXiv:2610.07863
- "StateWise: Diagnosing and Repairing Persistent Operational State Before Agent Actions" — Peng, Y., Feng, Z., Wu, T., Chen, J., Su, Y., Zhou, C., Du, T., Ji, S., arXiv:2610.05241
- "Memory Type Varies: Empowering LLM Agents for Long-Term Memory with Diverse Strategies" — Wen, Y., Xu, D., Jia, P., Wang, Y., Zhang, Y., Wang, M., Li, J., Zhang, W., Li, X., Liu, Y., Zhao, X., arXiv:2610.11573