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

Yuval Kansal, Karen Ullrich, Polina Kirichenko, Ilia Kulikov, Niraj Jha, Mohammad Pezeshki and Mark Ibrahim (Meta FAIR, Princeton University) introduce Self-Direction, which turns each agent failure into a small LoRA adapter stored in a reusable library of lessons.
Ask this paper
Mechanism. After a failed task the agent reflects on its own trajectory, extracts a lesson and distills it into a low-rank adapter of about 0.02% of base parameters. The base weights stay frozen and adapters are routed to related problems later.
Results. With Qwen3.6-27B agents, success rises 17.0 points on GAIA, 13.8 on Terminal-Bench 2.1 and 8.9 on Claw-Eval, approaching reported frontier systems such as Claude Opus 4.7 and Gemini 3.1 Pro.
Repeated mistakes. Across 185 prior mistakes, the share solved consistently over three encounters rises from 9.7% to 18.9%, nearly double the base agent with retries.
Transfer. A handful of adapters generalize to dozens of new tasks without further training, and the method beats in-context reflections, failed trajectories in context and a Skills.md file.
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.