MEMENTO: Learning Context Management for Long Context Processing Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
LLM agents that operate over long inputs must perform context management: deciding what to retain in a fixed-size context window. A common approach is compaction, where the model replaces its history with a self-generated note. Yet off-the-shelf agentic models, including GPT-5.5 and GLM-5.3, often write ineffective notes, and reinforcement learning (RL) alone rarely discovers useful note-taking behavior. We present MEMENTO, a long-context agent built on Qwen3-8B and trained to manage its context through compaction. We first bootstrap note-taking by fine-tuning on synthetic trajectories annotated with notes generated in hindsight, then reinforce it with RL using a reward that combines answer correctness, note-quality heuristics, and confidence calibration. Although trained only to compact into a fresh window, MEMENTO extends at test time to strategies such as context folding and confidence-based backtracking. On book-level question answering across four benchmarks, with books of up to 2.5M tokens, MEMENTO raises Qwen3-8B's accuracy from 36.9% to 67.8% while never holding more than 20K tokens in context. It outperforms GPT-5.5 agent in the same harness (13.1%) and full book context (56.7%) at less than 1/50 the cost. It also nearly matches a ~100x larger GLM-5.3 agent (69.3%) at 1/9 the cost, and comes within 6.4 points of GLM-5.3 full context at 1/26 the cost.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 24 of its 34 references that are in the map. Submitted 30 Oct 2026.
Builds on
24 of 34 references.
Closest ancestors · 4
Same direction, newest first
- 2025FoldAct: Efficient and Stable Context Folding for Long-Horizon Search Agents28 Dec
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
- 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents18 Jun
- 2024A Human-Inspired Reading Agent with Gist Memory of Very Long Contexts15 Feb
Other references · 20
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 10,542
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,986
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,765
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,655
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,392
- 2023GAIA: a benchmark for General AI Assistantscited by 1,237
- 2023Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedbackcited by 911
- 2025BrowseComp: A Simple Yet Challenging Benchmark for Browsing Agentscited by 725
- 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 701
- 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 278
- 2025Measuring AI Ability to Complete Long Software Taskscited by 210
8 more
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 154
- 2023Walking Down the Memory Maze: Beyond Context Limit through Interactive Readingcited by 144
- 2025Beyond Binary Rewards: Training LMs to Reason About Their Uncertaintycited by 137
- 2024GraphReader: Building Graph-based Agent to Enhance Long-Context Abilities of Large Language Modelscited by 49
- 2024NovelQA: Benchmarking Question Answering on Documents Exceeding 200K Tokenscited by 39
- 2025NovelHopQA: Diagnosing Multi-Hop Reasoning Failures in Long Narrative Contextscited by 11
- 2025LiteraryQA: Towards Effective Evaluation of Long-document Narrative QAcited by 9
- 2025SagaScale: A Realistic, Scalable, and High-Quality Long-Context Benchmark Built from Full-Length Novelscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026MemReread: Enhancing Agentic Long-Context Reasoning via Memory-Guided Rereading
- 2026Memex(RL): Scaling Long-Horizon LLM Agents via Indexed Experience Memory
- 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks
- 2026InfoMem: Training Long-Context Memory Agents with Answer-Conditioned Information Gain
- 2026ACM: Agentic Context Management for Long Horizon Tasks
- 2025Memento: Fine-tuning LLM Agents without Fine-tuning LLMs
- 2025Look Back to Reason Forward: Revisitable Memory for Long-Context LLM Agents
- 2025Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning