CoMem: Learning to Anticipate Failures from Retrieved Experience
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Reflection lets LLM agents improve from their own attempts, but the memory it builds is local to a single task, so an agent reflecting on its own tends to revisit the same explanation for failure. Cross-task reflective memory addresses this in two forms: retrieved memory keeps past experience explicit and looks up related cases, which is specific but bounded by the bank, and parametric memory internalizes experience into parameters, which generalizes but is grounded in nothing beyond the task description. When both are used, existing agents combine them additively, feeding their outputs to the solver side by side, so retrieved experience never changes what the learned memory produces. We introduce CoMem (Compounding Memory), which makes retrieved experience an input to the learned memory itself, at training and at inference. The agent builds a bank of its own successful and failed reflections, learns from retrieved cases to write failure hypotheses, candidate explanations of how an attempt is likely to go wrong, and at test time reasons from newly retrieved cases to guide each attempt. Varying the retrieved cases gives the memory different perspectives, yielding reflective diversity that is not merely sampled but also grounded in retrieved experience. Across two backbones and five benchmarks in math, code, and multi-hop QA, CoMem achieves strong overall performance. Additional evaluations show that it generalizes to out-of-distribution tasks and enables smaller models to provide effective guidance to stronger solvers.
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 38 of its 44 references that are in the map. Submitted 19 Oct 2026.
Builds on
38 of 44 references.
References · 38
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,852
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,789
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,986
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,841
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,799
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,329
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,243
- 2023Improving Factuality and Reasoning in Language Models through Multiagent Debatecited by 1,945
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,530
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,392
- 2024OlympiadBench: A Challenging Benchmark for Promoting AGI with Olympiad-Level Bilingual Multimodal Scientific Problemscited by 1,230
26 more
- 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,170
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,099
- 2023Encouraging Divergent Thinking in Large Language Models through Multi-Agent Debatecited by 1,072
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 1,067
- 2023Teaching Large Language Models to Self-Debugcited by 1,049
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 1,047
- 2021Measuring Coding Challenge Competence With APPScited by 938
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 855
- 2023Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Modelscited by 626
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 603
- 2018Texygen: A Benchmarking Platform for Text Generation Modelscited by 507
- 2024Agent Workflow Memorycited by 482
- 2024Training Language Models to Self-Correct via Reinforcement Learningcited by 456
- 2023Understanding the Effects of RLHF on LLM Generalisation and Diversitycited by 446
- 2023Beyond Human Data: Scaling Self-Training for Problem-Solving with Language Modelscited by 389
- 2024When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMscited by 282
- 2023Unleashing the Emergent Cognitive Synergy in Large Language Models: A Task-Solving Agent through Multi-Persona Self-Collaborationcited by 263
- 2026DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compressioncited by 220
- 2023Should we be going MAD? A Look at Multi-Agent Debate Strategies for LLMscited by 142
- 2025Verbalized Sampling: How to Mitigate Mode Collapse and Unlock LLM Diversitycited by 133
- 2023Retroformer: Retrospective Large Language Agents with Policy Gradient Optimizationcited by 115
- 2025On the Theoretical Limitations of Embedding-Based Retrievalcited by 115
- 2024Self-Contrast: Better Reflection Through Inconsistent Solving Perspectivescited by 77
- 2023On the Embedding Collapse when Scaling up Recommendation Modelscited by 33
- 2023Generative Retrieval as Dense Retrievalcited by 7
- 2026ParamMem: Augmenting Language Agents with Parametric Reflective Memorycited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Sentry: Learning to Recover from LLM Agent Failures at Test Time
- 2026From Reflection to Co-Evolution: Self-Evolving Agents with Locally Verified Memory
- 2026More Memory, Worse Agents: Error Reproduction and Anti-Persistence in LLM Agents
- 2026Remembering Is Not Enough: Refining Memories and Learning When to Use Them in Multi-Agent Systems
- 2026The Epistemics of Agent Memory: Measuring, and Governing, the Consolidation Decision in Long-Horizon LLM Agents
- 2026AdMem: Expectation-Grounded Procedural Memory for Long-Horizon Task-Solving Agents
- 2025Memento 2: Learning by Stateful Reflective Memory
- 2026Don't Just Trust Your Memory: Evidence-Linked Memory Reduces Memory-Induced Degradation in LLM Agents