Claude forgets everything when you close the tab. DevMemory automatically saves what it learns — and loads it back every session.
The problem
You spend the first 10 minutes re-explaining your project architecture. Every. Single. Time.
Claude doesn't remember your architecture decisions, past bugs, or project conventions — you have to re-explain everything each time.
Without memory, Claude can't learn from past debugging sessions. It'll suggest the same bad fix it already tried last week.
Pasting your README or copying context into every conversation is tedious and wastes tokens on irrelevant information.
How it works
DevMemory hooks into Claude Code — before and after each session.
.ai/memory/*.md
.ai/memory/*.md
Features
Lightweight, offline-capable, and git-friendly.
Memory is already on disk as Markdown. If context is fresh, inject exits in milliseconds — no API calls, no waiting.
Wire inject and compile as Claude Code hooks. Memory loads before every prompt and compiles in the background when done.
TF-IDF search via natural + SQLite. No ONNX runtime, no 100MB model downloads, no API keys for search.
Memory lives in .ai/memory/*.md. Readable, diffable, committable. No proprietary formats or locked databases.
Pass a session goal and DevMemory surfaces only the most relevant entries — less noise in context, more focused Claude.
Works via the dev-memory wrapper in terminal, or via CLAUDE.md injection for the VSCode extension.
Memory structure
Claude automatically categorises what it learns into structured files.
System design decisions, patterns, and structural choices.
Why you chose X over Y. Rationale that future sessions can rely on.
Issues found and how they were fixed — prevent re-investigating the same root causes.
Gotchas, non-obvious behaviours, and key insights from real sessions.
Quickstart
Choose between fully automatic (hooks) or manual mode.
Install globally via npm.
npm install -g dev-memory
Create or update .claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [{
"hooks": [{
"type": "command",
"command": "dev-memory inject 2>/dev/null || true"
}]
}],
"Stop": [{
"hooks": [{
"type": "command",
"command": "nohup dev-memory compile > /dev/null 2>&1 &"
}]
}]
}
}
nvm users: hooks run without loading your shell profile, so node won't be in PATH. Prefix each command with your node bin directory:
PATH=$(nvm which node | xargs dirname):$PATH dev-memory inject 2>/dev/null || true
Find your path: nvm which node | xargs dirname
Memory loads before every prompt. Knowledge compiles in the background after each session.
npm install -g dev-memory
Run from any project directory.
dev-memory --goal "fix auth bug"
Before opening VSCode:
dev-memory inject --goal "..."
dev-memory compile
Open source. MIT licensed. Under 500 lines of TypeScript.