MemTrace: State-Consistent Memory for Long-Horizon Coding Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. First posted on arXiv 4 Oct 2026.
Builds on
No reference list yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026VibeMemBench: Evaluating Memory Systems for Coding Agents on Real Repository Coding Tasks
- 2026MemTxn: A Transaction Boundary for Source-Supported Updates and Complete-State Recovery in Agent Memory
- 2026MemGuard: Persisting Verifier Signals for LLM-Agent Memory Governance
- 2026ContextSniper: AntTrail's Token-Efficient Code Memory for Repository-Level Program Repair
- 2026PACMI: Provenance-Aware Cascading Memory Invalidation for Long-Term LLM Agents
- 2026StateWise: Diagnosing and Repairing Persistent Operational State Before Agent Actions
- 2026MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systems
- 2026MemRepair: Hierarchical Memory for Agentic Repository-Level Vulnerability Repair