← YouTube

I Built The Best Claude Memory System (Beats Hermes)

YouTube · Simon Scrapes · June 10, 2026
A developer created a hybrid memory system for Claude that combines the strongest features from multiple existing frameworks including Hermes, Memsearch, and Memarch to address limitations in Claude Code's built-in memory capabilities. The system improves upon Claude Code's three core memory functions—storage, injection, and recall—by using automatic summarization via Memsearch for storage, implementing Hermes' token-capped injection approach for efficiency, and enabling better context retrieval. The solution is built in Cyclo code, allowing for customization and flexibility as requirements evolve.

Detailed Analysis

A software developer has documented the construction of a custom memory architecture for Claude-based agentic systems, arguing that no single existing framework adequately handles the three core functions of persistent AI memory: storage, injection, and recall. Drawing on analysis of approximately twenty open-source memory frameworks — including Hermes, GBrain, and Memarch — the author identifies the specific design decisions embedded in each function and concludes that Claude Code's out-of-the-box memory handling, while functional, contains meaningful gaps that compound in production use. The resulting system was rebuilt inside Claude Code by selectively borrowing the strongest components from each reviewed framework rather than adopting any single architecture wholesale.

The author's critique of Claude Code's native memory system is methodical and technically specific. Storage is characterized as "agent decided and summarized," meaning the model itself determines what is worth persisting, introducing a filtering layer that can silently discard context the user never knew was at risk. Injection loads a `claude.md` file and a memory index at every session start via a hook, which ensures consistency but imposes no character cap, leaving context windows potentially bloated. Recall is identified as the most serious deficiency: there is effectively no search mechanism — neither keyword nor semantic — meaning any fact not explicitly flagged and saved to a referenced memory file is permanently inaccessible unless the originating session can be individually resumed, which itself may have been compressed beyond utility. This three-part diagnostic framework — who triggers storage, how context is injected, and how retrieval is executed — provides a reusable analytical lens for evaluating any memory architecture.

The proposed solution follows an additive engineering philosophy: preserve the parts of Claude Code's native system that function well and layer targeted enhancements over the weaknesses. For storage, the summarization behavior is retained because it keeps memory files compact, but the agent-decided trigger is replaced with an automatic post-turn hook using a lightweight model like Claude Haiku. This design, borrowed from a framework called Mem Search, removes the agent's subjective filtering entirely and captures all conversational content into a daily log, prioritizing completeness over curation. The underlying insight is that cheap, fast summarization at high frequency is preferable to selective summarization that creates invisible gaps in the memory record.

The broader significance of this work sits at the intersection of two accelerating trends in AI development: the shift toward long-running agentic workflows and the growing recognition that context management is as architecturally important as the model itself. As Claude and similar systems are deployed in team environments where institutional knowledge must persist across sessions, users, and months of interaction, the limitations of default memory handling become compounding liabilities rather than minor inconveniences. The developer's emphasis on portability, interpretability, and modularity — explicitly noting the ability to swap components as the ecosystem evolves — reflects a maturing engineering posture toward AI tooling, one that treats the memory layer as first-class infrastructure rather than an afterthought. The fact that this level of customization is being pursued and documented publicly signals that sophisticated users are increasingly unwilling to accept the default memory behavior of frontier AI coding assistants.

Read original article →