CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation

Peiwen Li, Harshit Verma, Sophia Zhou, Haiwen Wang, Ngoc Bui +4 more
11/12/2026
cs.AIcs.CLcs.SE

No confident code implementation found for this paper.

Abstract

Coding agents tackle successive tasks on an evolving repository, carrying forward edits and writing memory before the next task is known. Selecting memory for unknown next tasks requires balancing future usefulness against the costs of writing and reading it.

Show full abstract

The actor must also decide when acting on available memory saves effort as the task unfolds. We introduce Coding-Repository Memory (CoReMem), a cost-internalizing framework that guides memory design and actor adaptation through measured memory value on the next task. Prospective segment valuation compares runs of the next task with and without individual trajectory segments from the same inherited repository state, guiding a compact memory built around anchors: repository locations and executable checks. Actor adaptation estimates on-policy memory value within rollout groups with and without memory, using a reward that prioritizes resolution and penalizes step count in successful runs. Provenance-gated value credit assigns the additional value term to steps identified as using memory-supplied anchors, while every step retains outcome credit. On ChainSWE, CoReMem raises the 27B actor's resolve rate from 21.0% to 25.7%, with 17% fewer steps and 11% fewer total cache-aware tokens, including memory-module calls, relative to the untrained actor model without memory.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026coremem,
  title  = {CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation},
  author = {Peiwen Li and Harshit Verma and Sophia Zhou and Haiwen Wang and Ngoc Bui and Heng Chang and Fei Fei and David van Dijk and Rex Ying},
  year   = {2026},
  eprint = {2611.17316},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.17316v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.17316.svg)](https://codeofpaper.com/paper/2611.17316)

Discussion