[BUG] autoMemoryEnabled=false does not suppress the ~11-16k memory preamble (re: closed #44829)
Summary
Setting autoMemoryEnabled: false in ~/.claude/settings.json correctly disables auto-memory writes and stops Claude from attempting them, but the hardcoded memory preamble (instructional text + \"currently empty\" branch + formatting templates) still loads into the system prompt at session start.
This was previously reported in #44829, which was auto-closed by the staleness bot on 2026-05-20 without Anthropic response. Re-filing with concrete measurement.
Reproduction
~/.claude/settings.json:{ \"autoMemoryEnabled\": false }- Empty the memory directory:
rm ~/.claude/projects/<encoded-cwd>/memory/*.md - Fully quit Claude Code app (
Cmd+Q), relaunch. - Open a fresh session, run
/contextbefore sending any prompt.
Measured impact (Claude Code 2.1.149, macOS)
| Model | \"Memory files\" bucket | All other buckets |
|---|---|---|
| Sonnet 4.5 (200k window) | 11.3k tokens | normal |
| Opus 4.7 (1M window) | 16.2k tokens | also inflated (+75% session overhead vs Sonnet) |
Memory dir contents: 0 files, 0 bytes. The entire bucket is preamble loaded from the binary.
Binary inspection (strings claude.app/Contents/MacOS/claude | grep -i memory) surfaces 4 preamble templates: 27,303 / 22,477 / 4,482 / 105 chars. The smallest is the \"is currently empty. When you save new memories, they will appear here.\" branch — proof the preamble loads regardless of autoMemoryEnabled state.
Impact
- ~11k tokens/session wasted on Sonnet, ~16k on Opus, for users who have explicitly opted out of auto-memory.
- For users with 5-tier learning systems (or any non-memory routing), this preamble actively pollutes context by suggesting routes Claude shouldn't take.
- Scales with usage: at 100 sessions/week, ~1.1M tokens/week of preamble for an opted-out user.
Requested behavior
When autoMemoryEnabled: false:
- Skip the memory preamble entirely (no instructional text, no \"currently empty\" branch, no format templates).
/memoryslash command can still work via lazy-load when explicitly invoked.
This is the fix #44829 originally requested — restating with measurement so it doesn't sit idle until the bot closes it again.
Related
- #44829 (closed-as-inactive 2026-05-20, NOT_PLANNED — no Anthropic response)
- #56329 (open: \"Optionally disable memory\" — more general request)
- #52488 (closed: \"decouple CLAUDE.md and MEMORY.md controls\")
28 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
do not close, this is still a real issue.
This bug still affects me on current Claude Code. Keeping open.
This bug still affects me on current Claude Code. Keeping open.
Still present, not a duplicate. Requesting this stay open until fixed.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.
This bug still affects me on current Claude Code. Keeping open.
Still reproducible on the latest version. Please keep this open.