claude-code - 💡(How to fix) Fix Feature request: decouple CLAUDE.md and MEMORY.md controls — autoMemoryEnabled should not toggle both simultaneously [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52488Fetched 2026-04-24 06:05:51
View on GitHub
Comments
3
Participants
3
Timeline
6
Reactions
0
Timeline (top)
commented ×3labeled ×2subscribed ×1

autoMemoryEnabled is a single toggle that controls both CLAUDE.md loading and MEMORY.md loading simultaneously. These two features are distinct and should be independently controllable.

Root Cause

Power users who manage their own instruction files (e.g. via sync tools that write to CLAUDE.md) need to decouple these two features. The current coupling forces an all-or-nothing choice that reduces flexibility.

Code Example

{
  "autoMemoryEnabled": true
}

---

{
  "claudeMdEnabled": true,
  "autoMemoryEnabled": true
}

---

{
  "autoMemoryEnabled": true,
  "autoMemoryInstructions": false
}
RAW_BUFFERClick to expand / collapse

Summary

autoMemoryEnabled is a single toggle that controls both CLAUDE.md loading and MEMORY.md loading simultaneously. These two features are distinct and should be independently controllable.

Current behavior

A single setting controls everything:

{
  "autoMemoryEnabled": true
}

When true, Claude Code:

  1. Loads and injects CLAUDE.md (project/user instructions)
  2. Loads and injects MEMORY.md and all memory files
  3. Injects a system prompt explaining how to use the memory system

There is no way to enable one without the other.

The problem this causes

  • If a user wants persistent memory (MEMORY.md) but does not want CLAUDE.md auto-loaded (e.g. managing it manually or via a sync tool), there is no way to do that.
  • Conversely, if a user wants CLAUDE.md loaded but does not want the memory system active, also impossible.
  • The injected system prompt explaining memory usage (point 3 above) is a direct consequence of this coupling — it is injected whenever the memory system is on, with no way to suppress it independently. This adds tokens even for users who understand the memory system and do not need the instructions.

Requested behavior

Split autoMemoryEnabled into separate controls:

{
  "claudeMdEnabled": true,
  "autoMemoryEnabled": true
}

Or at minimum add a way to suppress the instructional system prompt while keeping memory active:

{
  "autoMemoryEnabled": true,
  "autoMemoryInstructions": false
}

Why this matters

Power users who manage their own instruction files (e.g. via sync tools that write to CLAUDE.md) need to decouple these two features. The current coupling forces an all-or-nothing choice that reduces flexibility.

extent analysis

TL;DR

Split the autoMemoryEnabled toggle into separate controls for CLAUDE.md and MEMORY.md loading to allow independent configuration.

Guidance

  • Introduce a new configuration option, such as claudeMdEnabled, to control CLAUDE.md loading independently of MEMORY.md.
  • Consider adding a separate toggle, autoMemoryInstructions, to control the injection of the system prompt explaining memory usage.
  • Update the configuration schema to reflect the new options, ensuring backward compatibility where possible.
  • Review the code injecting the system prompt to conditionally render it based on the new autoMemoryInstructions setting.

Example

{
  "claudeMdEnabled": true,
  "autoMemoryEnabled": true,
  "autoMemoryInstructions": false
}

Notes

The proposed solution assumes that the existing codebase can be modified to accommodate the new configuration options. Additional testing may be required to ensure the changes do not introduce unintended behavior.

Recommendation

Apply a workaround by introducing separate configuration options for CLAUDE.md and MEMORY.md loading, as this allows for more flexibility and addresses the reported issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING