Claude Code starts each session with a fresh context window, so an architecture decision made only in yesterday’s conversation is not automatically available today. To stop repeating it, put stable, team-wide decisions in a version-controlled project CLAUDE.md; use auto memory for selected personal or project notes that Claude learns from corrections; then check what actually loaded. Neither mechanism guarantees that Claude will follow an instruction.
Why does Claude Code forget my project architecture?
Anthropic’s Claude Code documentation says, “Each Claude Code session begins with a fresh context window.” A decision discussed in one session therefore does not become permanent project knowledge simply because it appeared in the conversation. Claude needs the relevant information supplied again through a persistent instruction file or an applicable auto-memory note.
These mechanisms have different jobs. A CLAUDE.md file contains instructions written by you or your team. Auto memory contains selected notes Claude writes from corrections and preferences. Both can be loaded when a conversation starts, but neither is a transcript of every past session.
How do I stop explaining the same thing every session?
Put shared architecture decisions in a project instruction file
For guidance that every contributor should use, commit it to the repository. Anthropic documents ./CLAUDE.md and ./.claude/CLAUDE.md as project instruction locations. This is a practical place to record architecture that is not obvious from the code, such as which package owns a responsibility, which service may call another, or where new features belong. Because the file is version-controlled, teammates can work from the same guidance.
Recommended Free Tools
#1 Best Overall
Project instructions can also cover coding standards, naming conventions, build and test commands, and common workflows. Anthropic’s documentation also describes supported AGENTS.md loading configurations; check the current documentation for the configuration and version requirements before relying on one.
Make each instruction concrete enough to check
Use a precise directory, command, or rule rather than a general aspiration. Anthropic contrasts “Run npm test before committing” with the less specific “Test your changes.” In an architecture note, name the actual boundary or pattern: for example, specify which directory owns a capability and which layer should not import another. The example should reflect your project’s real conventions, not an assumed stack.
Rank #2
Keep each CLAUDE.md concise and organized. Anthropic recommends aiming for under 200 lines per file; this is guidance, not a guaranteed performance threshold. Put instructions that apply only to certain files into path-scoped rules where appropriate. Imported files also consume context, so splitting content into files does not make it free.
Use auto memory for recurring corrections, not as the team handbook
When Claude repeats a mistake or a code review reveals a reusable preference that is not already documented, auto memory can preserve a selected note for later sessions. It is intended for useful information such as feedback, preferences, and project-specific knowledge that Claude cannot simply infer from the code. It skips information inferable from the codebase and material already in CLAUDE.md.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Auto memory is stored locally per project. It is not shared automatically across developers’ machines or cloud environments, so it is not a substitute for a committed team instruction file.
| Question | Project CLAUDE.md |
Auto memory |
|---|---|---|
| Who writes it? | You or the team | Claude writes selected notes based on corrections and preferences |
| Best use | Explicit, stable rules and shared architecture | Recurring feedback and useful knowledge not already captured in instructions or inferable from code |
| Where it applies and how it is shared | Project guidance can be committed and shared through source control | Local to the project on that machine; not shared automatically across machines or cloud environments |
| What to watch when it loads | Placement, directory scope, nested guidance, and configuration affect which instructions apply | At conversation start, only the first 200 lines of MEMORY.md or the first 25KB, whichever comes first, load |
How do I confirm the right instructions loaded?
- Check the project file location. Confirm that the instruction file is in a documented location such as
./CLAUDE.mdor./.claude/CLAUDE.md, and that it is in the repository or directory Claude Code is actually using. - Run
/context. Use it to confirm which instruction files are in the current context. - Run
/memory. Use it to inspect or edit auto-memory notes. Keep the top-levelMEMORY.mdindex concise: only its first 200 lines or first 25KB, whichever is reached first, load at conversation start. Move detail into topic files rather than allowing the index to grow unchecked. - Investigate scope and conflicts. If guidance is missing or behavior is unexpected, check nested project instructions, conflicting directions, configuration, and whether the feature is supported by your installed version. In a large monorepo, scope rules to relevant paths; Anthropic also documents a setting for excluding irrelevant ancestor
CLAUDE.mdfiles.
Can Claude Code be forced to follow an architecture rule?
No: instruction and memory files guide the model but do not enforce behavior. Anthropic puts it plainly: “Claude treats them as context, not enforced configuration.” Use CLAUDE.md to explain the architecture and guide ordinary work. If a particular action must be blocked regardless of the model’s interpretation, Anthropic points to a PreToolUse hook rather than relying on prose instructions alone.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




