# Structurally Aligned Subtask-Level Memory for Software Engineering Agents

Source: [Structurally Aligned Subtask-Level Memory for Software Engineering Agents](<https://www.sota2.com/research/paper/699fd3702d603e6de3e3be14>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-02-27T05:00:04.201Z

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

Published: 2026-02-25T06:13:25.000Z

## 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.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Terminal-based problem solving on Terminal-Bench 2 (out-of-distribution)](<https://www.sota2.com/research/sota/terminal-based-problem-solving-on-terminal-bench-2-out-of-distribution.md>): Terminal-based problem solving; Terminal-Bench 2 (out-of-distribution); Task Success Rate: 30.59.

- [Environment setup and dependency repair on EnvBench Java (held-out)](<https://www.sota2.com/research/sota/environment-setup-and-dependency-repair-on-envbench-java-held-out.md>): Environment setup and dependency repair; EnvBench Java (held-out); Task Pass Rate: 32.71.

- [Repository-level issue resolution on SWE-Bench Verified (held-out (sample of 150))](<https://www.sota2.com/research/sota/repository-level-issue-resolution-on-swe-bench-verified-held-out-sample-of-150.md>): Repository-level issue resolution; SWE-Bench Verified (held-out (sample of 150)); Task Pass Rate: 61.33.

- [Environment setup and dependency repair on EnvBench-Python (held-out)](<https://www.sota2.com/research/sota/environment-setup-and-dependency-repair-on-envbench-python-held-out.md>): Environment setup and dependency repair; EnvBench-Python (held-out); Success Rate: 9.3.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2602.21611>)

[PDF](<https://arxiv.org/pdf/2602.21611.pdf>)
