Episode 14: Advanced Configuration — Customize Your Memory System

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

This episode's scenario: Claude-Mem is running smoothly. Now you want to switch Observation notes to Chinese, protect DB connection strings from being recorded, and control how much history gets injected per session.


14.1 Configuration File Reference

All settings live in ~/.claude-mem/settings.json:

{
  "CLAUDE_MEM_MODE": "code",
  "WORKER_PORT": 37777,
  "LOG_LEVEL": "info",
  "CONTEXT_OBSERVATION_LIMIT": 50,
  "CONTEXT_SESSION_LIMIT": 10,
  "DATA_DIR": "~/.claude-mem"
}
Field Default Description
CLAUDE_MEM_MODE "code" Working mode + language
WORKER_PORT 37777 Worker listen port
LOG_LEVEL "info" Log level (debug/info/warn/error)
CONTEXT_OBSERVATION_LIMIT 50 Max Observations injected at SessionStart
CONTEXT_SESSION_LIMIT 10 How many past sessions to look back

14.2 Multilingual Modes

Available Languages

Mode naming: code--[ISO 639-1 code]

Mode Language
code English (default)
code--zh Chinese
code--ja Japanese
code--ko Korean
code--es Spanish
code--fr French
code--de German

Other Workflow Modes

Mode Best For
code Regular coding (default)
chill Casual conversations, reduced recording
investigation Deep investigation, increased detail

14.3 Privacy Control: <private> Tags

Wrap sensitive content you don't want recorded:

You: My database connection is <private>postgresql://admin:[email protected]:5432/blog</private>
    Help me configure Prisma's connection.

What gets stored: "User configured Prisma database connection" — no passwords, no addresses.


14.4 Context Injection Tuning

Recommended Values

Project Size OBSERVATION_LIMIT SESSION_LIMIT
Small (1–2 weeks) 30 5
Medium (1–3 months) 50 10
Large (3+ months) 80 15

14.5 Folder Context Files

Claude-Mem auto-generates CLAUDE.md in your project directory with an activity timeline. New developers who clone the project get instant background context.


14.6 Data Export & Import

npx claude-mem export --output my-memories.json   # Export
npx claude-mem import --input my-memories.json     # Import on another machine

Use cases: Machine migration, backups, team sharing (mind privacy!).


Hands-On Exercise

  1. Switch language mode → work on the blog → verify Observations change language
  2. Use <private> tags on sensitive data → verify redaction in Web UI
  3. Adjust CONTEXT_OBSERVATION_LIMIT → observe difference in next session
  4. Check if CLAUDE.md was generated in your project directory
  5. Try exporting and reimporting memory data

Coming Up Next

Final episode! Troubleshooting guide, daily best practices, and a full retrospective using the blog project we've built throughout this series.

➡️ Episode 15: Troubleshooting + Best Practices + Summary