Procedural memory for coding agents: only trust a fix after tests pass, cuts tool calls 30%
maa____z · reddit · 2026-10-15
The author built MuscleMemory (Apache-2.0), procedural memory for coding agents that remembers how tasks were fixed so agents don't re-derive solutions. Key lesson: memory storing a wrong fix is worse than none, because agents trust it and stop searching.
Six rules: (1) only learn from sessions where tests passed after the final code change; (2) the source session doesn't count as proof — the fix must pass in 2 more independent sessions; (3) a human approves files, edits, and tests first; (4) one failed check pulls the recipe; (5) failed attempts are saved only as "watch out" notes, never as fixes; (6) recall uses no model calls — exact file/command matching plus local search, 13ms.
Small-sample measurements (cost, not success rate): across 18 sessions on 3 repair tasks, 30% fewer tool calls, 28% faster, 25% fewer input tokens; a different agent reusing learned skills saw 30% fewer tool calls and 18% lower cost at 3% slower. Open question: skills aren't rechecked when their dependency files change until a failed check triggers a pull.
Related event: MuscleMemory: Open-Source Procedural Memory for Coding Agents(3 posts)→
More from coding & agent
- Agent Teams Cost Up to 5.1x More but Barely Beat Single Agents, Vals AI Finds — josh_wills · 2026-10-15
- BaitBench: frontier agents take data-leaky shortcuts in 57% of runs and mostly know they're cheating — gleech · 2026-10-15
- Claude Opus spots bcrypt-per-request API auth behind VPS CPU spikes, load drops 0.9 to 0.4 — DanielLockyer · 2026-10-15
- Burkov: labs are now training coding LLMs on git history, exactly as he predicted 9 months ago — burkov · 2026-10-15
- Cohere research: swarms of small models reach frontier-level software engineering — Cohere_Labs · 2026-10-15
- 12 GitHub repos to supercharge Claude Code: context, parallel sessions, automation — Roger_M_Taylor · 2026-10-15