PROJECTMEM: A Local-First, Event-Sourced Memory and Judgment Layer for AI Coding Agents
cs.AI
Submitted: 2026-06-10
Updated: 2026-09-30
Comments: 19 pages, 6 figures, 6 tables. Major revision: expanded the study to six months and 3,228 events across 27 projects; added judgment-gate latency, supersession, cross-project attribution, and client-compatibility evaluations; and revised the system design, related work, limitations, and worked example. Code and reproducibility artifacts: https://github.com/riponcm/projectmem
Code: https://github.com/riponcm/projectmem
License: http://creativecommons.org/licenses/by/4.0/
The gist: AI coding agents often lose project-specific rationale across sessions and may repeat approaches that previously failed.
Terminology
Abstract
AI coding agents often lose project-specific rationale across sessions and may repeat approaches that previously failed. The bottleneck is often not model capability but missing coding agent memory: a durable record of what was decided, tried, and ruled out. We present projectmem, an open-source, local-first memory and judgment layer for AI coding agents, which records development as an append-only, plain-text log of typed events (issues, attempts, fixes, decisions, and notes) and deterministically projects it into compact summaries served through the Model Context Protocol (MCP). When invoked before an edit, a file-scoped advisory precheck returns recorded failures, open issues, and churn for the target file, a design point we call Memory-as-Governance. We evaluate feasibility through an author-run, six-month self-study on two machines, a controlled latency benchmark, and client-compatibility tests. The study contains 3,228 unique events from 27 projects; 56% are issue-lifecycle events, and 86 of 427 distinct issues closed by a recorded fix had at least one failed attempt before the first fix in event-log order. These histories are candidates for later warnings, not evidence that warnings prevented failures. On a synthetic repository, the median analysis time for a 1,500-event log decreased from 42.0 seconds to 79.3 milliseconds, while git subprocesses per check decreased from 1,500 to two and the tested warning output was preserved. The results establish the feasibility of persistent project memory for AI coding agents and motivate a controlled repeat-failure benchmark for measuring whether coding-agent memory prevents repeated failures. Source code is available at https://github.com/riponcm/projectmem.
Sources
- Memanto: Typed Semantic Memory with Information-Theoretic Retrieval for Long-Horizon Agents
- STALE: Can LLM Agents Know When Their Memories Are No Longer Valid?
- LlamaFirewall: An open source guardrail system for building secure AI agents
- Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
- ESAA: Event Sourcing for Autonomous Agents in LLM-Based Software Engineering
- Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHub
- Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directions
- Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions
- MemTX: Transactional Belief Commit for Stateful Agent Memory
- MemCog: From Memory-as-Tool to Memory-as-Cognition in Conversational Agents
- AGrail: A Lifelong Agent Guardrail with Effective and Adaptive Safety Detection
- ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback
- MemGPT: Towards LLMs as Operating Systems
- Generative Agents: Interactive Simulacra of Human Behavior
- Beyond the Context Window: A Cost-Performance Analysis of Fact-Based Memory vs. Long-Context LLMs for Persistent Agents
- Zep: A Temporal Knowledge Graph Architecture for Agent Memory
- Revoked but Still Authoritative: An Empirical Study of Revocation Enforcement in Agent-Memory Systems
- Reflexion: Language Agents with Verbal Reinforcement Learning
- Large Language Models for Software Engineering: A Reproducibility Crisis
- Cognitive Architectures for Language Agents
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems