Memory Command - Claude Code
View and edit auto-memory and CLAUDE.md via the /memory command.
The /memory command is the CLI surface for inspecting and editing the memory layer without opening files manually.
What it does
Running /memory opens a view of the current session's memory sources - CLAUDE.md files, auto memory entries, and any rules that are loaded. You can edit entries, prune stale notes, and trigger a reload. It's faster than hunting for the right file in a nested repo.
When to use it
- Auditing what Claude currently knows about the project.
- Pruning auto memory that's gone stale.
- Quickly adding a new rule without opening an editor.
- Troubleshooting weird behavior by checking which instructions are active.
Gotchas
- Changes take effect on the next turn, not retroactively.
- Removing a CLAUDE.md entry doesn't delete the file - it just unloads it for this session.
- Be careful editing live during a turn - partial edits can confuse Claude's current plan.
Official docs: https://code.claude.com/docs/en/memory.md#view-and-edit-with-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?





