Lune

ICML2026Top-tier venue

Structurally Aligned Subtask-Level Memory for Software Engineering Agents

Kangning Shen, Jingyuan Zhang, Chenxi Sun, Wencong Zeng, Yang Yue

Abstract

Large Language Models (LLMs) have demonstrated significant potential as autonomous software engineering (SWE) agents. Recent work has further explored augmenting these agents with memory mechanisms to support long-horizon reasoning. However, these approaches typically operate at a coarse instance granularity, treating the entire problem-solving episode as the atomic unit of storage and retrieval. We empirically demonstrate that instance-level memory suffers from a fundamental granularity mismatch, resulting in misguided retrieval when tasks with similar surface descriptions require distinct reasoning logic at specific stages. To address this, we propose Structurally Aligned Subtask-Level Memory, a method that aligns memory storage, retrieval, and updating with the agent’s functional decomposition. Extensive experiments on SWE-bench Verified demonstrate that our method consistently outperforms both vanilla agents and strong instance-level memory baselines across diverse backbones, improving mean Pass@1 over the vanilla agent by +4.7 pp on average (e.g., +6.8 pp on Gemini 2.5 Pro). Performance gains grow with more interaction steps, showing that leveraging past experience benefits long-horizon reasoning in complex software engineering tasks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory cites SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
  • Reflexion: language agents with verbal reinforcement learning cites Generative Agents: Interactive Simulacra of Human Behavior
  • SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
  • SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites Reflexion: language agents with verbal reinforcement learning
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on16

  1. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
  2. SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao et al.ICLR 2024 · 2,082 citations
  3. SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret et al.NeurIPS 2024 · 2,059 citations
  4. Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris et al.UIST 2023 · 1,882 citations
  5. ReasoningBank: Scaling Agent Self-Evolving with Reasoning MemorySiru Ouyang, Jun Yan, I-Hung Hsu, Yanfei Chen et al.ICLR 2026 · 244 citations

Related papers

  1. Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model AgentsYi Yu, Liuyi Yao, Yuexiang Xie, Qingquan Tan et al.ACL 2026 · 40 citations
  2. HiAgent: Hierarchical Working Memory Management for Solving Long-Horizon Agent Tasks with Large Language ModelMengkang Hu, Tianxing Chen, Qiguang Chen, Yao Mu et al.ACL 2025
  3. Context as a Tool: Context Management for Long-Horizon SWE-AgentsShukai Liu, Bo Jiang, Jian Yang, Yizhi Li et al.ACL Findings 2026
  4. BOAD: Discovering Hierarchical Software Engineering Agents via Bandit OptimizationIris Xu, Guangtao Zeng, Zexue He, Charles Jin et al.ICLR 2026 · 5 citations
  5. ChemAgent: Self-updating Memories in Large Language Models Improves Chemical ReasoningXiangru Tang, Tianyu Hu, Muyang Ye, Yanjun Shao et al.ICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines