[BUG] autoMemoryEnabled=false does not suppress the ~11-16k memory preamble (re: closed #44829)

Open 💬 28 comments Opened May 30, 2026 by guillaume-paradise

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

  1. ~/.claude/settings.json: { \"autoMemoryEnabled\": false }
  2. Empty the memory directory: rm ~/.claude/projects/<encoded-cwd>/memory/*.md
  3. Fully quit Claude Code app (Cmd+Q), relaunch.
  4. Open a fresh session, run /context before 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).
  • /memory slash 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\")

View original on GitHub ↗

28 Comments

github-actions[bot] · 1 month ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/44829
  2. https://github.com/anthropics/claude-code/issues/52488
  3. https://github.com/anthropics/claude-code/issues/29178

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

guillaume-paradise · 1 month ago

do not close, this is still a real issue.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 month ago

Still present, not a duplicate. Requesting this stay open until fixed.

guillaume-paradise · 1 month ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 month ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 month ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 month ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 1 month ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 29 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 27 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 25 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 23 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 21 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 19 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 17 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 15 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 13 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 11 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 9 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 7 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 5 days ago

Still reproducible on the latest version. Please keep this open.

guillaume-paradise · 3 days ago

This bug still affects me on current Claude Code. Keeping open.

guillaume-paradise · 1 day ago

Still reproducible on the latest version. Please keep this open.