Skip to main content
QUICK REVIEW

[Paper Review] Your Code Agent Can Grow Alongside You with Structured Memory

Yi-Xuan Deng, Xiaoqin Liu|arXiv (Cornell University)|Feb 25, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

MemCoder enables continual human-AI co-evolution by structuring historical commits into memory and using self-refinement, achieving SOTA performance on SWE-bench Verified and boosting DeepSeek-V3.2’s resolved rate to 77.8%.

ABSTRACT

While "Intent-oriented programming" (or "Vibe Coding") redefines software engineering, existing code agents remain tethered to static code snapshots. Consequently, they struggle to model the critical information embedded in the temporal evolution of projects, failing to leverage the "reasoning trajectories" implicit in past successful practices. This limitation results in rigid behavioral logic and a lack of autonomous adaptability, ultimately hindering their ability to tackle complex, repository-level problems. To bridge this static-dynamic mismatch, we propose MemCoder, a framework designed to enable continual human-AI co-evolution. MemCoder first structures historical human experience to distill latent intent-to-code mappings from past commits. It then employs a self-refinement mechanism driven by verification feedback to correct agent behavior in real-time. Crucially, an experience self-internalization mechanism is introduced to crystallize human-validated solutions into long-term knowledge, thereby supporting sustained evolution. Experimental results on SWE-bench Verified demonstrate that MemCoder not only achieves State-of-the-Art (SOTA) performance but also delivers a 9.4% improvement in resolved rate over the general foundation model DeepSeek-V3.2. These findings indicate that equipping agents with the capability to co-evolve with humans via project history and real-time feedback effectively unlocks the potential of general models in complex software engineering tasks.

Motivation & Objective

  • Identify limitations of static code agents in repository-level tasks and the need for continual human-AI co-evolution.
  • Propose MemCoder to structure historical developer experience into memory and enable execution-time refinement and long-term internalization of solutions.
  • Demonstrate that leveraging structured memory and feedback improves performance on SWE-bench Verified against strong baselines.
  • Show that human-validated knowledge can be internalized to sustain agent evolution across projects.

Proposed method

  • Introduce MemCoder as a three-phase framework: (1) construct structured memory from historical commits into memory entries capturing latent intent-to-code mappings; (2) perform context-aware dual-stage retrieval and execution-time self-refinement via a Refining Sub-agent; (3) internalize human-validated solutions into long-term memory to close the co-evolution loop.
  • Represent experience as memory entries m_i = (o_i, c_i, k_i, p_i, r_i, s_i) distilled from commits using an LLM and a generator prompt P_gen.
  • Use a two-stage retrieval: (a) fast approximate nearest neighbor search over embedded memory; (b) cross-encoder reranking for final relevance.
  • Enable dynamic self-refinement with a Refining Sub-agent that generates test code t and a verification checklist l conditioned on p, execution trace, feedback, and retrieved memories.
  • Internalize proven experiences into memory via f_intern, updating M with new memory entries and enabling long-term knowledge growth.
  • Evaluate MemCoder on SWE-bench Verified using GPT-5.2 as backbone (and confirm with DeepSeek-V3.2), comparing to top methods and performing ablations to assess module contributions.
Figure 1 : Comparison of MemCoder with existing methods. MemCoder facilitates evolution by learning the intrinsic mapping from high-level intent to concrete code implementation, derived from structured memory.
Figure 1 : Comparison of MemCoder with existing methods. MemCoder facilitates evolution by learning the intrinsic mapping from high-level intent to concrete code implementation, derived from structured memory.

Experimental results

Research questions

  • RQ1Can MemCoder's structured memory and self-refinement improve repository-level code patch generation compared with static-code agents?
  • RQ2How does the quality and organization of memory affect retrieval, reasoning, and execution in LLM-based code agents?
  • RQ3What is the impact of dynamic self-refinement and memory internalization on long-term agent performance across iterations?
  • RQ4Does human-validated internalization of solutions yield sustained gains over time?

Key findings

  • MemCoder achieves SOTA performance on SWE-bench Verified, with GPT-5.2 delivering a state comparable to top methods.
  • Using MemCoder with GPT-5.2 achieves a resolved rate of 83.8% under pass@2 and 78.8% under pass@1 on SWE-bench Verified (compared against baselines).
  • MemCoder with GPT-5.2 outperforms general models like DeepSeek-V3.2, achieving 83.8% vs. 68.4% baseline improvements noted in the paper’s context.
  • Ablation studies show all three modules (commit retrieval CR, experience representation ER, dynamic self-refine DSR) contribute to gains, with CR providing the largest impact.
  • Structured memory yields robust improvements over raw commits, validating the importance of standardized, agent-friendly memory representations.
  • Retrieval granularity and quantity exhibit trade-offs; moderate initial top-k and controlled retrieval yield best performance, avoiding noise and diminishing returns.
Figure 2 : Architectural overview of MemCoder, illustrating a closed-loop human–AI co-evolution paradigm.In Stage 1, MemCoder reconstructs developer cognition by distilling raw commit histories into structured long-term memory, capturing latent intent-to-code mappings from historical human practices
Figure 2 : Architectural overview of MemCoder, illustrating a closed-loop human–AI co-evolution paradigm.In Stage 1, MemCoder reconstructs developer cognition by distilling raw commit histories into structured long-term memory, capturing latent intent-to-code mappings from historical human practices

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.