Causal Episodic Memory for Feedback-Driven Agent Repair

Khang Nhat Hoang Vo, Tam Minh, Anh Trac Duc Dinh, Thuyen Vinh Ha Bui, Tho Quan


Abstract
LLM agents that repair failures often discard successful corrections, forcing later episodes to rediscover similar solutions. We study whether finalized repair outcomes can improve subsequent Text-to-SQL episodes without parameter updates. We introduce MERIT, a training-free agent that maintains an online dual-polarity memory of oracle-verified corrections and observed unsuccessful directions. Under oracle-assisted benchmark feedback, only memories from earlier finalized episodes are eligible for retrieval. A deterministic classifier assigns a coarse failure type, which conditions a hybrid lexical-dense retriever before the frozen model generates each revision. 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. Our implementation is available here: https://github.com/nhatkhangcs/merit
Anthology ID:
2026.realm-1.70
Volume:
Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026)
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Ehsan Kamalloo, Nicolas Gontier, Nikolai Rozanov, Maryam Hashemzadeh, Akhil Arora
Venues:
REALM | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1011–1025
Language:
URL:
https://aclanthology.org/2026.realm-1.70/
DOI:
Bibkey:
Cite (ACL):
Khang Nhat Hoang Vo, Tam Minh, Anh Trac Duc Dinh, Thuyen Vinh Ha Bui, and Tho Quan. 2026. Causal Episodic Memory for Feedback-Driven Agent Repair. In Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026), pages 1011–1025, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Causal Episodic Memory for Feedback-Driven Agent Repair (Vo et al., REALM 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.realm-1.70.pdf