Lesson 3: auto memory Configuration and Practical Tips

⏱ Est. reading time: 3 min Updated on 5/7/2026

3.1 Configuration Options

You can manage auto memory via settings.json or environment variables:

Option Purpose Default
autoMemoryEnabled Toggle auto memory on/off true
autoMemoryDirectory Modify storage path System default
CLAUDE_CODE_DISABLE_AUTO_MEMORY Disable via environment variable N/A
--bare CLI flag to skip memory systems entirely Off

3.2 How to Trigger Memory Recording

Since auto memory is based on LLM autonomous judgment, it won't record if there's no significant "lesson" in the conversation. You can guide it using the following "trigger phrases":

  • User category: "I prefer using pnpm over npm."
  • Feedback category: "This refactoring approach is great; let's follow this pattern for similar scenarios."
  • Project category: "Note: This project is currently in the transition phase from Webpack to Vite."
  • Reference category: "The related design document is at https://docs.example.com/design-v2."

3.3 Verification and Management

Verifying Activation:

  1. Run claude --version (ensure it's ≥ 2.1.32).
  2. Use the /memory command within a session to check the "Auto-memory" status.

Manual Management:

You can directly edit files under ~/.claude/projects/<hash>/memory/. If the memory becomes cluttered, you can tell the LLM: "Help me organize my auto memory: remove outdated feedback and merge duplicate entries."

3.4 Common Misconceptions

  • Misconception 1: "It should record the entire conversation." — Reality: It only records conclusive facts, not raw transcripts.
  • Misconception 2: "More memory is always better." — Reality: Excessive entries dilute critical signals and may lead to truncation during startup loading.
  • Misconception 3: "Memory is shared globally." — Reality: It is isolated by Working Tree by default and is not shared across different projects.