Problem
Claude Code's auto-memory system (~/.claude/projects/*/memory/MEMORY.md) cannot be disabled. There is no setting, flag, or configuration option to turn it off.
Why this is a problem
For users who manage their own context systems, auto-memory is actively harmful:
-
Shadow state - It creates a parallel memory system outside the user's control. The user can't easily view, audit, or understand what's been stored.
-
Not git-tracked - MEMORY.md lives in ~/.claude/projects/ which is outside the repo. It can't be committed, reviewed in PRs, or versioned alongside the codebase. This is a significant regression from keeping context in repo-local files like CLAUDE.md.
-
Not portable across CLIs - Users who work with multiple AI CLIs (Claude, Gemini, Codex) and maintain shared instruction files (e.g. AGENTS.md symlinked to CLAUDE.md / GEMINI.md) have no way to share auto-memory. It's a Claude-only silo.
-
Context bloat - Auto-memory consumes context window tokens on every conversation. For users who already have well-structured CLAUDE.md and skill files, this is redundant context that displaces useful working memory.
-
No opt-out - The system prompt includes "You have a persistent auto memory directory at..." with instructions to use it. There is no setting to suppress this. Even deleting the files doesn't prevent Claude from recreating them.
Requested solution
A setting to disable auto-memory entirely, e.g.:
// ~/.claude/settings.json
{
"autoMemory": false
}
Or at project level:
// .claude/settings.json
{
"autoMemory": false
}
When disabled:
- The auto-memory system prompt injection should be suppressed
- Claude should not read from or write to the memory directory
- No memory files should be created
Workaround attempts
- Deleting
~/.claude/projects/*/memory/ - files get recreated
- Adding "do not use auto-memory" to CLAUDE.md - unreliable, competes with system prompt
- There is no
settings.json key that controls this
Environment
- Claude Code CLI (latest)
- macOS
Problem
Claude Code's auto-memory system (
~/.claude/projects/*/memory/MEMORY.md) cannot be disabled. There is no setting, flag, or configuration option to turn it off.Why this is a problem
For users who manage their own context systems, auto-memory is actively harmful:
Shadow state - It creates a parallel memory system outside the user's control. The user can't easily view, audit, or understand what's been stored.
Not git-tracked - MEMORY.md lives in
~/.claude/projects/which is outside the repo. It can't be committed, reviewed in PRs, or versioned alongside the codebase. This is a significant regression from keeping context in repo-local files likeCLAUDE.md.Not portable across CLIs - Users who work with multiple AI CLIs (Claude, Gemini, Codex) and maintain shared instruction files (e.g.
AGENTS.mdsymlinked toCLAUDE.md/GEMINI.md) have no way to share auto-memory. It's a Claude-only silo.Context bloat - Auto-memory consumes context window tokens on every conversation. For users who already have well-structured
CLAUDE.mdand skill files, this is redundant context that displaces useful working memory.No opt-out - The system prompt includes "You have a persistent auto memory directory at..." with instructions to use it. There is no setting to suppress this. Even deleting the files doesn't prevent Claude from recreating them.
Requested solution
A setting to disable auto-memory entirely, e.g.:
Or at project level:
When disabled:
Workaround attempts
~/.claude/projects/*/memory/- files get recreatedsettings.jsonkey that controls thisEnvironment