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

DevFeed: [CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation](<https://devfeed.tech/articles/coremem-cost-internalizing-memory-for-successive-coding-tasks-with-prospective-valuation-131744.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.17316>)

Author: Peiwen Li (Yale University), Harshit Verma (Yale University), Sophia Zhou (Yale University), Haiwen Wang (Yale University), Ngoc Bui (Yale University), Heng Chang (Tsinghua University), Fei Fei (Goodv

Published: 2026-11-13T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [agentic-coding](<https://devfeed.tech/topics/agentic-coding.md>)

Tags: [coding](<https://devfeed.tech/tags/coding.md>), [coding-agents](<https://devfeed.tech/tags/coding-agents.md>), [cost](<https://devfeed.tech/tags/cost.md>), [costs](<https://devfeed.tech/tags/costs.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [effort](<https://devfeed.tech/tags/effort.md>), [framework](<https://devfeed.tech/tags/framework.md>), [future](<https://devfeed.tech/tags/future.md>), [memory](<https://devfeed.tech/tags/memory.md>), [provenance](<https://devfeed.tech/tags/provenance.md>), [repository](<https://devfeed.tech/tags/repository.md>), [reward](<https://devfeed.tech/tags/reward.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [tokens](<https://devfeed.tech/tags/tokens.md>), [valuation](<https://devfeed.tech/tags/valuation.md>), [value](<https://devfeed.tech/tags/value.md>)

## AI overview

CoReMem selects repository memory for successive coding tasks by measuring whether trajectory segments help on a next task from the same inherited repository state, accounting for memory's writing and reading costs. It builds compact memory around repository locations and executable checks, then adapts the actor using rollout groups with and without memory. Additional value credit goes to steps identified as using memory-supplied anchors, while all steps retain outcome credit. On ChainSWE, the reported 27B actor resolve rate rose from 21.0% to 25.7%, with 17% fewer steps and 11% fewer cache-aware tokens, including memory-module calls, compared with the untrained actor without memory.

## Source excerpt

arXiv:2611.17316v1 Announce Type: cross 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. 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.