Large language model (LLM) coding agents increasingly rely on persistent memory to carry lessons across sessions, yet most existing memory stores treat a stored memory as trustworthy indefinitely: a note recorded about a piece of code remains "active" long after the code it described has changed. We present robo-cortex, a local-first memory store for AI coding agents built around a single principle we call knowledge integrity: a memory is only as trustworthy as the code it points at. Every memory may be anchored to the Git blob hash of the source file(s) it describes; a lazy staleness check, triggered on every read, recomputes those hashes and flags any memory whose underlying code has changed for review, while healing memories whose code has reverted to its recorded state. Memories carry explicit, mechanically-derived evidence strength and author-stated confidence rather than opaque relevance scores. The system uses no embeddings, no vector database, and no cloud service; it is pure Python standard library over a single SQLite file per repository, exposed through a command-line interface, a Python SDK, and eight Model Context Protocol (MCP) tools. We describe the design in full and report an honest empirical evaluation: six of six pre-registered functional scenarios pass; a controlled token-economy benchmark on a small subject model (Claude Haiku 4.5, n=5 per arm across three real historical bugs, 30/30 correct fixes) shows a median 11.9% reduction in fresh tokens and 15.1% reduction in API-equivalent cost when the agent is supplied a retrieved context pack, with a recorded memory breaking even after roughly five reuses. We keep every limitation of these measurements in view: a single small model, a single self-documenting codebase, three tasks, and modest sample sizes. The git-blob-hash anchoring, the code-change-triggered invalidation-and-healing lifecycle, and the evidence model are, to our knowledge, novel in combination; the underlying content-addressable primitive is Git's.
Sorin Neagu (Sun,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: