Read-After-Write Staleness and History Erasure in Asynchronous LLM Agent Memory
Agent-memory services, the software components that give LLM agents long-term memory, are often built as asynchronous pipelines: the write path acknowledges each conversation session, and a worker behind a message broker extracts facts from it later. This architecture admits two consistency failures. A question can arrive before the newest session is committed, so the reader answers from a superseded fact; and once the update is committed, stores that update in place, and read paths that mask superseded facts, lose the earlier value. We formalise both failures, read-after-write staleness and history erasure, and measure them on LongMemEval-S with a deterministic lag barrier and a commit-reordering model. We propose DeltaWAL, which writes raw turns with monotonic epochs to a write-ahead log before the broker publish and merges the uncommitted, relevance-gated log tail with stored facts in epoch order; DeltaWAL-Versioned also keeps every fact version. When the update is the session still in flight, an asynchronous store answers at most 11.7% of knowledge-update questions correctly across three readers, while DeltaWAL-Versioned answers 96.7% with glm-5.3, its own score with a complete store, and acknowledges writes in milliseconds. Ablations show that the relevance gate carries this gain, while an explicit newer-wins instruction adds nothing measurable. In-place updates and read-side masking both erase answers to questions about earlier values; keeping versions in the store, not the prompt format, restores them, and Mem0 OSS 1.0.11 shows the same loss, which a read-only history hook recovers. On MemConflict, audited by four LLM raters from three model families, the system ordering replicates for genuine updates; on a small set of false corrections, newer-wins ordering makes readers believe the false statement more often, an exploratory limit of the design.
Authors
- Jagrit Vats (ORCID: https://orcid.org/0009-0007-6256-031X)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-22
- DOI
- https://doi.org/10.5281/zenodo.24446418
- Primary Topic
- Distributed systems and fault tolerance
- Type
- preprint