cs.AIOct 22, 2026

Don't Forget What You Just Learned: Self-Directed Repair Turns Agent Mistakes Into Lasting Lessons

Authors: Yuval Kansal, Karen Ullrich, Polina Kirichenko, Ilia Kulikov, Niraj K. Jha, Mohammad Pezeshki, Mark Ibrahim

Organizations: Princeton University · Meta FAIR

Abstract

Intelligent agents should learn from their mistakes so that experience leads to continuous improvement. Yet today's agents recover from a mistake only temporarily: in-context reflections are easily forgotten across sessions and compete for limited context, while full-parameter fine-tuning is expensive and can interfere with existing capabilities. We introduce Self-Direction, a mechanism for agents to learn from mistakes that combines the benefits of temporary in-context retries and policy updates. When an agent fails a task, it reflects on its own trajectory in order to extract a lesson and immediately distills it into a lightweight low-rank adapter. By keeping the original weights frozen, Self-Direction prevents adapter training from overwriting base-model parameters while training additional parameters equivalent to ~0.02% of the base model's parameter count for each adapter. The agent then saves these adapters in a persistent library of lessons, automatically routing them to solve related problems later. Experiments with agents based on open-weight models from the Qwen family across open-ended research (GAIA), tool-use workflows (Claw-Eval), and terminal tasks (Terminal-Bench 2.1) show that our method improves overall success rates by 8.9 to 17.0 percentage points and performs competitively with frontier systems. We find that Self-Direction reduces repeated mistakes across future encounters of a task, nearly doubling the reliability of an agent's corrections. Learned lessons also transfer: a handful of adapters generalize to dozens of new tasks without additional training. Ultimately, this self-directed repair transforms everyday mistakes into lasting lessons.

Figures & tables

Appendix figures & tables24 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Learning from Failure: Inference-Time Self-Improvement for Computer-Use Agents

    Jun 30, 2026Xueqiao Sun, Xiaohan Wang, Ludwig Schmidt +2Computer-Use AgentsSelf-Improving Agents

  2. Experience Memory Graph: Extracting Reusable Correction Knowledge from Agent Trajectories

    Jul 15, 2026Wenjun Wang, Yuchen Fang, Fengrui Liu +2Agent MemoryLLM Self-Correction

  3. Experiential Reflective Learning for Self-Improving LLM Agents

    Mar 25, 2026Marc-Antoine Allard, Arnaud Teinturier, Victor Xing +1Self-Improving AgentsLLM Agent Training