Skip to content
Book Open access

TwinMem-Agent: Episodic and Semantic Memory for Repository-Level Program Repair

Jul 2026 · SIGSOFT FSE Companion · pp. 1447-1451 · 0 citations · 15 references
Computer Science

TL;DR

This work presents TwinMem-Agent, which pairs a test-patch-validate loop with episodic memory (grounded demonstrations) and semantic memory (LLM-distilled notes) after each issue, and retrieves exemplars and guidelines at inference time, all without fine-tuning model weights.

Abstract

Large language models for repository-level repair usually reset context for every issue, even though real maintenance often unfolds as a stream of tickets within the same codebase. We study this sequential regime on a stratified 8 × 25 subset of SWE-Bench Pro (eight projects, twenty-five instances each), running instances in commit-time order within each project so later repairs can draw on earlier trajectories. We present TwinMem-Agent, which pairs a test-patch-validate loop with episodic memory (grounded demonstrations) and semantic memory (LLM-distilled notes). After each issue, a memory module compacts the trajectory, merges updates under a fixed budget, and retrieves exemplars and guidelines at inference time, all without fine-tuning model weights. Using DeepSeek-V3.2 as the shared backbone and identical Dockerized instances, we compare TwinMem-Agent to mini-swe-agent on Pass@1 and average inference cost, and ablate the memory module on 25 Ansible instances measuring Pass@1 and RSR. TwinMem-Agent achieves 89.1% Pass@1 versus 60.0% for the baseline at roughly 18× lower cost ($0.0044 vs. $0.0798). Removing the memory module reduces Pass@1 by 8 pp and RSR by 12 pp, with the larger RSR drop confirming that accumulated cross-issue experience most directly benefits bug reproduction and cascades into higher patch success.

Read PDF

Similar papers

Preprint Aug 2026

Coupling Planning with Episodic Memory in LLM Agents for Software Issue Resolution

PMCoder is presented, an issue-resolution agent that couples a hierarchical phase planner with episodic memory that outperforms either component alone and reduces repeated failed actions, empty-patch exits, and context-window exhaustion.

Jiahao Zhang, Yi-Fan Zhang, Yu Huang · 2 citations · ⚡1
Preprint Aug 2026

Runtime Observability for Heterogeneous Attention Memory

A runtime observability contract is given that covers all four memory classes with three operators, instantiate it on six model configurations across five architecture families, and compose the per-stage bounds into an executable request-level risk ledger.

Fanzhe Wei, Li Liu, Ziyang Wang et al. · 2 citations
Preprint Aug 2026

Reconstructing the Right Episode: Evaluating Interleaved Conversational Memory Beyond Long Context

This work introduces SCALE-QA, a constraint-grounded task QA benchmark for flat unsegmented threads targeting episode integrity failure, and proposes Temporal-Semantic Interleaved Memory Reconstruction (TSIM), which segments the turn stream into coherent episodes and indexes them through a hierarchical multi-view memor...

Zhe-Xi Feng, Rui-Yi Zhang, Yong-Bo Yang et al. · 0 citations
Preprint Aug 2026

Muscle Memory for Agents: Compile not Merely Retrieve

This paper argues that Muscle Memory - the practice of compiling recurring user intent into purpose-built specialist agents - is a distinct memory paradigm from retrieval, and argues that compilation is a better fit for the workloads where current assistants impose a multi-turn tax on their users.

Pouya Ghiasnezhad Omran, Soujanya Lanka, Qin Zhang et al. · 0 citations
#artificial intelligence Preprint Sep 2026

DolphinBench: Mapping the Pareto Frontier of Agent Memory

DolphinBench is presented, a benchmark that evaluates memory directly through an agent's task completion and requires all evaluations to report total cost and latency alongside accuracy, which enables us to evaluate agent memory systems holistically.

Soumil Rathi, Deshraj Yadav, Taranjeet Singh · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.