autoMemoryDirectory setting not respected by auto-memory system
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
- Set
autoMemoryDirectoryin.claude/settings.local.json:
``json``
{
"autoMemoryDirectory": "/path/to/repo/knowledge/memory"
}
- In a conversation, trigger a memory save (e.g., user asks Claude to remember something)
- 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗