← Reddit

Update on my 3-layer Claude memory system — solved the “when do you save context” problem, looking for sharper ideas

Reddit · DallasPhoenix69 · June 18, 2026
A developer discovered that logging Claude session summaries at session end fails because models lack any signal indicating when a session terminates. The fix involved switching to milestone-based logging—after completed tasks, confirmed decisions, or finished sub-projects—which more effectively captures high-value information that would be hardest to reconstruct if lost. The resulting three-layer memory system combines native memory auto-loaded each chat, on-demand conversation search across past sessions, and manual checkpoint exports triggered by a phrase that stores session state to a Drive folder.

Detailed Analysis

A developer working with Claude has published a follow-up account of their custom three-layer memory architecture, focusing specifically on a structural flaw they identified and resolved in the system's logging mechanism. The original design called for Claude to log a session summary "at the end" of a conversation, but the author discovered this premise was technically unsound: Claude has no intrinsic awareness of session boundaries and cannot distinguish between an early exchange and a late one based on any signal within its context window. The revised approach replaces that abstract trigger with milestone-based logging — checkpoints are written after a finished task, a confirmed decision, or a completed sub-project. The author notes that decision confirmation, in particular, tends to capture the highest-value information, since reconstructing why a decision was made is typically harder than reconstructing what work was done.

The three-layer system itself represents a thoughtful hierarchy of memory persistence. Layer 1 relies on Claude's native memory feature, which auto-loads relevant context at the start of each new chat. Layer 2 adds on-demand conversation search, allowing past exchanges to be retrieved when needed. Layer 3 is a manual checkpoint triggered by a specific phrase, which exports the current session state to a Google Drive folder containing a Session Recovery Log, a Quick Reference Card, and writing samples intended for voice-matching purposes. This layered structure addresses a genuine limitation of stateless large language model interactions: without external scaffolding, context accumulated over weeks or months of work is not reliably accessible across sessions.

The problem the author describes — how to determine *when* a memory system should write — is one of the more underappreciated engineering challenges in building persistent AI workflows. Most user-facing tooling around LLM memory focuses on *what* to store and *how* to retrieve it, but the triggering logic is equally consequential. A system that logs too infrequently risks losing critical context; one that logs too often creates noisy, low-signal records that degrade retrieval quality. The author's shift toward event-driven, semantically meaningful triggers (decisions confirmed, tasks completed) is conceptually aligned with how knowledge management systems in software engineering handle state — writing to a log when something meaningful happens rather than on a fixed schedule or at process termination.

This project sits within a broader trend of power users building memory and continuity infrastructure around Claude and other frontier models to compensate for the stateless nature of their base APIs. As Claude has added native memory features, a class of technically sophisticated users has begun layering additional systems on top of them, treating the native memory as a foundation rather than a complete solution. The author's multi-year investment in this problem reflects a recurring pattern: users whose workflows depend heavily on long-running, iterative collaboration with AI assistants encounter the session boundary problem early and are compelled to engineer around it. The open questions the author raises — how to automate the "is this worth logging" judgment, and what triggers beyond decisions and task completions merit checkpoints — remain genuinely unsolved at the tooling level and represent areas where both third-party developers and Anthropic itself have room to provide more robust native support.

Article image Read original article →