Original Reddit post

Every time you start a new Claude Code session, it remembers nothing. Whatever you were working on yesterday, which files you touched, how you solved that weird bug last week… gone. The context window starts empty every single time. I always assumed this was just how it worked. Turns out it’s not a model limitation at all. It’s a missing infrastructure layer. And someone built the layer. It’s called kcp-memory. It’s a small Java daemon that runs locally and indexes all your Claude Code session transcripts into a SQLite database with full-text search. Claude Code already writes every session to ~/.claude/projects/ as JSONL files. kcp-memory just reads those files and makes them searchable. So now you can ask “what was I working on last week?” and get an answer in milliseconds. You can search for “OAuth implementation” and it pulls up the sessions where you dealt with that. You can see which files you touched, which tools were called, how many turns a session took. The thing that really clicked for me is how the author frames the memory problem. Human experts carry what he calls episodic memory. They remember which approaches failed, which parts of the codebase are tricky, what patterns kept showing up. An AI agent without that layer has to rediscover everything from scratch every single session. kcp-memory is the fix for that. It also ships as an MCP server, which means Claude Code itself can query its own session history inline during a session without any manual CLI commands. There’s a tool called kcp_memory_project_context that detects which project you’re in and automatically surfaces the last 5 sessions and recent tool calls. Call it at the start of a session and Claude immediately knows what it was doing there last time. Installation is just a curl command and requires Java 21. No frameworks, no cloud calls, the whole thing is about 1800 lines of Java. Full writeup here: https://wiki.totto.org/blog/2026/03/03/kcp-memory-give-claude-code-a-memory/ Source: https://github.com/Cantara/kcp-memory (Apache) I am not the author of KCP, FYI. submitted by /u/Turbo-Sloth481

Originally posted by u/Turbo-Sloth481 on r/ClaudeCode