Causal Episodic Memory for Feedback-Driven Agent Repair
LLM agents that repair failures often discard successful corrections, forcing later episodes to rediscover similar solutions. MERIT addresses this by maintaining an online dual-polarity memory of oracle-verified corrections and observed unsuccessful directions. It is training-free: a deterministic classifier assigns a coarse failure type, which conditions a hybrid lexical-dense retriever before the frozen model generates each revision. Only memories from earlier finalized episodes are eligible for retrieval, simulating causal cross-query memory without parameter updates.
Using Qwen2.5-7B-Instruct with identical initial predictions and repair budgets, MERIT improves execution accuracy over stateless iterative repair from 66.34% to 69.79% on Spider and from 47.35% to 48.44% on BIRD. Paired analyses provide clear evidence for the Spider gain but weaker evidence on BIRD. MERIT is not reliably separated from untyped dynamic retrieval on either benchmark, while Reflexion-style memory reaches 51.24% on BIRD at substantially higher inference cost.
Ablations show that negative memory contributes modestly, the value of type conditioning and lexical-dense ranking is dataset dependent, and schema-local experience provides the most consistent benefit. These results clarify when causal cross-query memory improves repair and when broader memory representations remain preferable.