Auto Memory - Claude Code
Automatic session-to-session memory of build commands, errors, and learnings.
Auto memory records the small facts Claude picks up during a session - how to run tests, which commands failed, what you corrected - and surfaces them on the next session.
What it does
Claude writes short notes to a per-project memory file when something seems worth remembering: "tests run with pnpm test --filter web", "the deploy script needs DATABASE_URL exported", "user prefers short commit messages". On the next session, Claude reads those notes into context automatically.
When to use it
- Projects where build or deploy steps are non-obvious.
- Long-running work that spans many sessions.
- Capturing user preferences without manually writing them into CLAUDE.md.
- Reducing the "what's the test command?" dance.
Gotchas
- The file grows over time. Review and prune periodically or you'll carry stale notes.
- Auto memory is local by default. Don't rely on it for team-wide context - use CLAUDE.md for that.
- Secrets may slip in if you're not careful. Scan the file before committing it anywhere.
Official docs: https://code.claude.com/docs/en/memory.md#auto-memory
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
Was this helpful?





