True Memory Fragments: Source-Bound Memory and Pain-Inspired Reflexes for Coding Agents
Coding agents can retain an understanding of a program across sessions, yet source changes can leave that understanding plausible while it continues to guide action. We present True Memory Fragments (TMF), whose central idea separates retaining memory from admitting it as current evidence: source bindings sense changes in support, relevant memory is checked at use time, and detected staleness interrupts affected use before directing localized rereading and recalibration. We call this sense–interrupt–recover policy a pain-inspired reflex. TMF binds code claims to source fingerprints. Retrieval gates withhold stale content and stop affected graph expansion; host-integrated Reflex hooks can block covered tool actions before execution. The design requires no continuous refresh of all memory and does not equate staleness with falsehood: freshness concerns matching recorded bindings, while correctness still requires source support and validation.In a historical Guava case study with four conditions and 50 runs per condition, two stale-context conditions produced obsolete-loop placements in 43 and 45 runs; both the gated and source-only conditions produced none. Their raw pass counts were 42 and 40. These observations have important attribution limits: instructions differed, and historical claims also failed derivation-version checks. We present the evidence with these limits and outline a six-condition follow-up design under refinement to separate stale exposure, warning, withholding, and visible receipts.
Authors
- Zhenyu Lv
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-26
- DOI
- https://doi.org/10.5281/zenodo.23658989
- Primary Topic
- Software Engineering Research
- Type
- preprint