Configuration
Settings File
Settings are managed in~/.claude-mem/settings.json. The file is auto-created with defaults on first run.
Core Settings
| Setting | Default | Description |
|---|---|---|
CLAUDE_MEM_MODEL | sonnet | AI model for processing observations (when using Claude) |
CLAUDE_MEM_PROVIDER | claude | AI provider: claude, gemini, or openrouter |
CLAUDE_MEM_MODE | code | Active mode profile (e.g., code--es, email-investigation) |
CLAUDE_MEM_CONTEXT_OBSERVATIONS | 50 | Number of observations to inject |
CLAUDE_MEM_WORKER_PORT | 37777 | Worker service port |
CLAUDE_MEM_SKIP_TOOLS | ListMcpResourcesTool,SlashCommand,Skill,TodoWrite,AskUserQuestion | Comma-separated tools to exclude from observations |
Gemini Provider Settings
| Setting | Default | Description |
|---|---|---|
CLAUDE_MEM_GEMINI_API_KEY | — | Gemini API key (get free key) |
CLAUDE_MEM_GEMINI_MODEL | gemini-2.5-flash-lite | Gemini model: gemini-2.5-flash-lite, gemini-2.5-flash, gemini-3-flash |
OpenRouter Provider Settings
| Setting | Default | Description |
|---|---|---|
CLAUDE_MEM_OPENROUTER_API_KEY | — | OpenRouter API key (get key) |
CLAUDE_MEM_OPENROUTER_MODEL | xiaomi/mimo-v2-flash:free | Model identifier (supports 100+ models) |
CLAUDE_MEM_OPENROUTER_MAX_CONTEXT_MESSAGES | 20 | Max messages in conversation history |
CLAUDE_MEM_OPENROUTER_MAX_TOKENS | 100000 | Token budget safety limit |
CLAUDE_MEM_OPENROUTER_SITE_URL | — | Optional: URL for analytics |
CLAUDE_MEM_OPENROUTER_APP_NAME | claude-mem | Optional: App name for analytics |
System Configuration
| Setting | Default | Description |
|---|---|---|
CLAUDE_MEM_DATA_DIR | ~/.claude-mem | Data directory location |
CLAUDE_MEM_LOG_LEVEL | INFO | Log verbosity (DEBUG, INFO, WARN, ERROR, SILENT) |
CLAUDE_MEM_PYTHON_VERSION | 3.13 | Python version for chroma-mcp |
CLAUDE_CODE_PATH | (auto-detect) | Path to Claude Code CLI (for Windows) |
Model Configuration
Configure which AI model processes your observations.Available Models
Shorthand model names automatically forward to the latest version:haiku- Fast, cost-efficientsonnet- Balanced (default)opus- Most capable
Using the Interactive Script
~/.claude-mem/settings.json.
Manual Configuration
Edit~/.claude-mem/settings.json:
Mode Configuration
Configure the active workflow mode and language.Settings
| Setting | Default | Description |
|---|---|---|
CLAUDE_MEM_MODE | code | Defines behavior and language. See Modes & Languages. |
Examples
Spanish Code Mode:Files and Directories
Data Directory Structure
The data directory location depends on the environment:- Production (installed plugin):
~/.claude-mem/(always, regardless of CLAUDE_PLUGIN_ROOT) - Development: Can be overridden with
CLAUDE_MEM_DATA_DIR
Plugin Directory Structure
Plugin Configuration
Hooks Configuration
Hooks are configured inplugin/hooks/hooks.json:
Search Configuration (v5.4.0+)
Migration Note: As of v5.4.0, Claude-Mem uses skill-based search instead of MCP tools. As of v5.5.0, the skill was renamed to “mem-search” for better scope differentiation. Previous (v5.3.x and earlier): MCP search server with 9 tools (~2,500 tokens per session) Current (v5.4.0+): mem-search skill with HTTP API (~250 tokens per session) No configuration required - the mem-search skill is automatically available in Claude Code sessions. Search operations are now provided via:- Skill:
plugin/skills/mem-search/SKILL.md(auto-invoked when users ask about past work) - HTTP API: 10 endpoints on worker service port 37777
- Progressive Disclosure: Full instructions loaded on-demand only when needed
Version Channel
Claude-Mem supports switching between stable and beta versions via the web viewer UI.Accessing Version Channel
- Open the viewer at http://localhost:37777
- Click the Settings gear icon
- Find the Version Channel section
Switching Versions
- Try Beta: Click “Try Beta (Endless Mode)” to switch to the beta branch with experimental features
- Switch to Stable: Click “Switch to Stable” to return to the production release
- Check for Updates: Pull the latest changes for your current branch
Endless Mode is experimental and slower than standard mode. See Beta Features for full details and important limitations.
Worker Service Management
Worker service is managed by Bun as a background process. The worker auto-starts on first session and runs continuously in the background.Context Injection Configuration
Claude-Mem injects past observations into each new session, giving Claude awareness of recent work. You can configure exactly what gets injected using the Context Settings Modal.Context Settings Modal
Access the settings modal from the web viewer at http://localhost:37777:- Click the gear icon in the header
- Adjust settings in the right panel
- See changes reflected live in the Terminal Preview on the left
- Settings auto-save as you change them
Loading Settings
Control how many observations are injected:| Setting | Default | Range | Description |
|---|---|---|---|
| Observations | 50 | 1-200 | Total number of recent observations to include |
| Sessions | 10 | 1-50 | Number of recent sessions to pull observations from |
- Higher values = More context but slower SessionStart and more tokens used
- Lower values = Faster SessionStart but less historical awareness
- Default of 50 observations from 10 sessions balances context richness with performance
Filter Settings
Control which observation types and concepts are included: Types (select any combination):bugfix- Bug fixes and error resolutionsfeature- New functionality additionsrefactor- Code restructuringdiscovery- Learnings about how code worksdecision- Architectural or design decisionschange- General code changes
how-it-works- System behavior explanationswhy-it-exists- Rationale for code/designwhat-changed- Change summariesproblem-solution- Problem/solution pairsgotcha- Edge cases and pitfallspattern- Recurring patternstrade-off- Design trade-offs
Display Settings
Control how observations appear in the context: Full Observations:| Setting | Default | Options | Description |
|---|---|---|---|
| Count | 5 | 0-20 | How many observations show expanded details |
| Field | narrative | narrative, facts | Which field to expand |
| Setting | Default | Description |
|---|---|---|
| Read cost | true | Show tokens to read each observation |
| Work investment | true | Show tokens spent creating the observation |
| Savings | true | Show total tokens saved by reusing context |
Advanced Settings
| Setting | Default | Description |
|---|---|---|
| Model | sonnet | AI model for generating observations |
| Worker Port | 37777 | Port for background worker service |
| MCP search server | true | Enable Model Context Protocol search tools |
| Include last summary | false | Add previous session’s summary to context |
| Include last message | false | Add previous session’s final message |
Manual Configuration
Settings are stored in~/.claude-mem/settings.json:
Customization
Settings can be customized in~/.claude-mem/settings.json.
Custom Data Directory
Edit~/.claude-mem/settings.json:
Custom Worker Port
Edit~/.claude-mem/settings.json:
Custom Model
Edit~/.claude-mem/settings.json:
Custom Skip Tools
Control which tools are excluded from observations. Edit~/.claude-mem/settings.json:
ListMcpResourcesToolSlashCommandSkillTodoWriteAskUserQuestion
- Include TodoWrite: Remove from skip list to track task planning
- Include AskUserQuestion: Remove to capture decision-making conversations
- Skip additional tools: Add tool names to reduce observation noise
Advanced Configuration
Hook Timeouts
Modify timeouts inplugin/hooks/hooks.json:
- SessionStart: 120s (needs time for smart install check and context retrieval)
- UserPromptSubmit: 60s
- PostToolUse: 120s (can process many observations)
- Stop: 60s
- SessionEnd: 60s
Worker Memory Limit
The worker service is managed by Bun and will automatically restart if it encounters issues. Memory usage is typically low (~100-200MB).Logging Verbosity
Enable debug logging:Configuration Best Practices
- Use defaults: Default configuration works for most use cases
- Override selectively: Only change what you need
- Document changes: Keep track of custom configurations
- Test after changes: Verify worker restarts successfully
- Monitor logs: Check worker logs after configuration changes
Troubleshooting Configuration
Configuration Not Applied
-
Restart worker after changes:
-
Verify environment variables:
-
Check worker logs:
Invalid Model Name
If you specify an invalid model name, the worker will fall back tosonnet and log a warning.
Valid shorthand models (forward to latest version):
- haiku
- sonnet
- opus
Port Already in Use
If port 37777 is already in use:-
Set custom port:
-
Restart worker:
-
Verify new port:
Next Steps
- Architecture Overview - Understand the system
- Troubleshooting - Common issues
- Development - Building from source

