Use /memory to Save Important Context That Persists Across Sessions
Every new Claude Code session starts fresh — Claude doesn't know your preferences, your project's quirks, or the decisions you've already made. The memory feature fixes that by persisting key information across conversations.
/memory
This opens Claude Code's memory interface where you can view, add, and manage saved memories. Claude uses these automatically in future sessions.
You can also ask Claude to remember things naturally during a conversation:
"Remember that we always use UUIDs instead of auto-incrementing IDs in this project"
"Remember that the staging environment uses a different database host than production"
"Remember I prefer detailed explanations over terse answers"
Claude saves these as persistent memories and applies them in every future session — without you repeating yourself.
Useful things to save in memory:
# Project conventions not in CLAUDE.md
"Remember: we never use raw SQL in this project — always use the query builder"
# Personal preferences
"Remember: I prefer Pest over PHPUnit and always want compact test output"
# Architecture decisions
"Remember: the notification system uses a queue, don't call notifiers synchronously"
# Deployment notes
"Remember: always run migrations before clearing the cache on deploy"
The difference between memory and CLAUDE.md:
- CLAUDE.md — project-wide rules shared with your team via git
- Memory — personal context and preferences that follow you across projects
Claude Code's memory builds up over time. The more you use it, the less you need to explain — Claude learns your style, your project's patterns, and your preferred approaches.
The best assistant is one that learns your preferences — use memory so Claude gets better every session instead of starting from zero.
via Claude Code
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.