autoMemoryDirectory setting not respected by auto-memory system

Resolved 💬 2 comments Opened May 18, 2026 by amolverma Closed May 18, 2026

Description

The autoMemoryDirectory setting in .claude/settings.local.json does not appear to be respected. Claude Code continues to write memories to the default ~/.claude/projects/<project>/memory/ path instead of the configured directory.

Steps to reproduce

  1. Set autoMemoryDirectory in .claude/settings.local.json:

``json
{
"autoMemoryDirectory": "/path/to/repo/knowledge/memory"
}
``

  1. In a conversation, trigger a memory save (e.g., user asks Claude to remember something)
  2. Claude writes the memory to ~/.claude/projects/<project>/memory/ instead of the configured path

Expected behavior

Memories should be written to the path specified by autoMemoryDirectory.

Actual behavior

The system prompt hardcodes the default ~/.claude/projects/<project>/memory/ path, and autoMemoryDirectory does not override it. Claude follows the hardcoded path in its instructions.

Workaround

Added a note in CLAUDE.md pointing to the correct directory, and locked the default directory with chmod 000 to prevent writes. The CLAUDE.md note alone was not sufficient — Claude still defaulted to the hardcoded path until manually corrected.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗