Diagnostics

Claude Memory Troubleshooting

Most Claude memory problems reduce to four questions: was the right memory enabled, was the right file loaded, is the instruction specific, and is another memory contradicting it?

Use Settings > Capabilities for Claude app memory checks.

Use /memory for Claude Code loaded-file and auto-memory checks.

Rewrite vague instructions into verifiable commands.

Use hooks or settings for requirements that must always run.

"Each Claude Code session begins with a fresh context window." Anthropic Claude Code Docs

If Claude app memory seems wrong

Start in Settings > Capabilities. Confirm memory is enabled, inspect the memory summary, and edit or reset it if needed. If the issue involves a specific Project, check whether the relevant chat belongs in that project or should be moved out.

If you deleted or changed conversations, remember that the Help Center describes memory updates as happening within 24 hours. Avoid assuming an immediate synthesis unless you explicitly edited the memory summary in chat or settings.

If Claude Code misses an instruction

Run /memory. Verify the expected CLAUDE.md, CLAUDE.local.md, and rule files are listed. If a file is absent, check where Claude Code was launched, whether the file lives in an ancestor directory, and whether exclusions or scope rules apply.

If the file is loaded, check whether another instruction contradicts it. Claude Code loads multiple files into one context; closer or local files may appear later, but contradictions still create unreliable behavior.

If the memory is too vague

Replace soft preferences with observable rules. "Format cleanly" is weak. "Use 2-space indentation in TypeScript files" is stronger. "Always test before deploy" is weak. "Run npm run build before wrangler pages deploy" is stronger.

Claude reads structure the way people do. Use short headers, bullets, and commands. Remove archive notes that do not matter every session.

If instructions disappear after /compact

Claude Code docs say project-root CLAUDE.md survives compaction because Claude re-reads it from disk and reinjects it. Nested files in subdirectories may not reappear until Claude reads files in those subdirectories again.

If the lost instruction only lived in conversation, it was not durable memory. Add it to the right memory surface before compacting or starting a new session.

FAQ

Why is Claude not following CLAUDE.md?

The file may not be loaded, the instruction may be vague, another instruction may conflict, or the requirement may need enforcement through hooks or settings.

Does /compact erase CLAUDE.md?

Project-root CLAUDE.md is re-read after /compact. Nested files may reload only when Claude reads files in those subdirectories.

Primary Sources