arXiv:cs.AI· Hongming Xu, Le Zhou, ZhongHe Jin, Xiang Zhang, Bo Tang, Zhiyu Li, Xuanhe Zhou, Juncheng Zhang·· 4 小时前
MemTrace:为长周期编程智能体打造状态一致的内存系统
MemTrace: State-Consistent Memory for Long-Horizon Coding Agents
AI 导读
MemTrace 是一个具备来源感知能力的内存系统,将执行历史存为绑定文件、符号、测试等关键信息的不可变 Memory Trace,并用 Memory Trace Graph 组织其执行顺序与依赖关系。
正文
Abstract:As coding agents take on long-horizon software evolution tasks spanning multiple files and stages, longer execution trajectories introduce two coupled challenges: (1) accumulated histories strain context budgets, and (2) repository changes can invalidate earlier execution evidence. Existing approaches address these challenges through techniques like larger context windows, compression, retrieval, or repository representations, but often fail to reconstruct a consistent task state after a context refresh or verify whether recalled evidence remains valid. Thus, we introduce MemTrace, a provenance-aware memory system that preserves execution history and aligns its reuse with the evolving task (e.g., iterative cross-file repair) and repository state. MemTrace stores history as immutable Memory Traces anchored to key information (e.g., files, symbols, tests), and organizes their execution order and dependencies in a Memory Trace Graph. When context is constrained, working memory retains only compact Memory Anchors, from which the agent can reconstruct the latest execution state and locate evidence relevant to its next action. Before restoring historical evidence, MemTrace checks its validity against the current repository state and retrieves only what the next action requires. Across three complementary long-horizon coding benchmarks, MemTrace consistently outperforms all fully evaluated baselines under the same backbone and harness, improving DeepSWE pass@1 by 21.2 points, SWE-EVO Resolved Rate by 4.4 points, and SWE-Milestone Score by 17.8 points under Codex CLI.
| Comments: | 20 pages, 7 figures. Code: this https URL |
| Subjects: | Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.04838 [cs.AI] |
| (or arXiv:2610.04838v2 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2610.04838 arXiv-issued DOI via DataCite |
Submission history
From: Homy Xu [view email]
[v1]
Sun, 4 Oct 2026 00:45:37 UTC (12,112 KB)
[v2]
Thu, 8 Oct 2026 15:53:56 UTC (12,106 KB)
来源:arXiv:cs.AI · arxiv.org