Let Claude Remember Things Automatically with Auto Memory
Every Claude Code session starts with a blank context — unless you use auto memory. When enabled, Claude writes its own notes about your project: build commands it discovered, debugging patterns that worked, preferences you corrected it on. No manual CLAUDE.md editing required.
Auto memory is on by default (requires Claude Code v2.1.59 or later). To check or toggle it, run /memory in a session. To disable it per-project, add this to .claude/settings.json:
{
"autoMemoryEnabled": false
}
Or disable globally with an environment variable:
export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1
Notes are stored as plain markdown files in ~/.claude/projects/<project>/memory/. The main MEMORY.md file (first 200 lines) loads at the start of every session. Longer notes get filed into topic files like debugging.md or api-conventions.md that Claude reads on demand.
Run /memory at any point to browse what Claude has saved, edit notes, or delete anything you want removed. All files are plain text you can read and modify directly.
When you tell Claude something like "always use pnpm, not npm" or correct a mistake it made, it saves that to auto memory so the same thing doesn't need repeating next session.
Auto memory turns corrections into permanent preferences — so you say it once and Claude remembers.
Log in to leave a comment.
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.
Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.