
How to Give Claude Code Persistent Memory (2 Commands)
Claude Code is incredible for coding — but it starts fresh every session. It doesn't know you used Railway yesterday, that you prefer Sora over Inter, or that you spent 3 hours debugging that psycopg2 pool deadlock last week. Here's how to fix that in 2 commands. Setup (30 seconds) pip install mengram-ai mengram setup mengram setup creates a free account and installs Claude Code hooks. That's it. What happens next Every Claude Code session now does this automatically: Session Start → Loads your cognitive profile (who you are, tech stack, preferences) Every Prompt → Searches past sessions for relevant context After Response → Saves new knowledge in background No manual saves. No tool calls. No MCP configuration. Claude just remembers. What it actually remembers Mengram stores 3 types of memory — not just facts: Semantic memory — facts and preferences: "Uses Python 3.12, deploys to Railway, prefers PostgreSQL over MySQL" Episodic memory — events and decisions: "March 15: Debugged pool de
Continue reading on Dev.to
Opens in a new tab




