Developer workflow
Claude Code Memory: CLAUDE.md, /memory, and MCP Context
Understand CLAUDE.md, Claude Code auto memory, /memory, and when to add Origin's local MCP memory for shared project context.
Article packet
Workflows
Developers using Claude Code, Cursor, and other AI coding agents
7 min read
01
Use CLAUDE.md for stable project instructions and auto memory for assistant-learned corrections and preferences.
02
Use /memory to inspect and edit what Claude Code has loaded before you blame recall.
03
Use Origin when memory should be local, source-backed, reviewable, and shared with Cursor, Codex, and other MCP clients.
01
Quick answer
Claude Code already has memory. The official memory path combines CLAUDE.md files you write, auto memory Claude writes from corrections and preferences, and the /memory command for viewing and editing what is loaded.
Origin is for the next problem: keeping evolving work context local, source-backed, and available outside one Claude Code session or one Claude-only surface.
- Put stable rules, commands, and project architecture in CLAUDE.md.
- Use Claude Code auto memory for repeated corrections and preferences Claude discovers.
- Use Origin for decisions, gotchas, handoffs, source-backed wiki pages, and shared MCP memory.
02
How Claude Code memory works
Each Claude Code session starts with a fresh context window. Claude Code carries knowledge forward through CLAUDE.md files and auto memory, and both are loaded into new conversations as context.
That makes Claude Code memory useful for persistent instructions. It also means memory competes with the rest of the context window, so it should stay concise and scoped.
03
Use CLAUDE.md for stable instructions
CLAUDE.md is excellent for project-level instructions: build commands, test commands, architecture notes, coding standards, and long-lived conventions the whole team should share.
It should not become a dumping ground for every transient observation from every coding session. When the file gets too large or contradictory, Claude has more context to scan and less room for the current task.
04
Use /memory before adding another layer
If Claude Code seems to forget something, first inspect the built-in memory surface. /memory is the place to view and edit what Claude Code has loaded.
That step matters because some problems are not Origin problems. The memory may be missing, stale, too broad, duplicated, or loaded at the wrong scope.
05
When Origin adds value
Use Origin when project context needs provenance, review, deletion, handoff, distillation, and access from more than one MCP-compatible tool.
Useful Origin captures are specific and grounded: why a decision was made, what tradeoffs were considered, what command verifies a change, which module owns a behavior, or what gotcha should not be rediscovered next week.
06
Install path for Claude Code
The Claude Code plugin is the most complete Origin path because it adds /init, /brief, /capture, /recall, /handoff, /distill, and review workflows around the local daemon and MCP connector.
After installing, restart Claude Code if prompted, run /init once, then verify a harmless capture and recall before relying on Origin for real project memory.
Claude Code plugin
/plugin marketplace add 7xuanlu/origin
/plugin install origin@7xuanlu
/init
/capture This project uses Origin for local AI work memory.
/recall local AI work memoryVerify Claude Code memory locally
Install the Origin plugin, run /init, then test one capture and recall before adding real project context.
FAQ