[BUG] MEMORY.md is not loaded into system prompt — model has no instruction to check it

Resolved 💬 2 comments Opened Feb 12, 2026 by genesiscz Closed Mar 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

MEMORY.md files saved via the # memory shortcut are stored at ~/.claude/projects/<encoded-path>/memory/MEMORY.md, but this file is never loaded into the model's system prompt or context. The model receives CLAUDE.md files (global + project) but has zero awareness of MEMORY.md.

This means:

  1. The model cannot recall any memories saved via # unless the user explicitly tells it to find and read the file
  2. The model has no instruction in its system prompt to look for or check MEMORY.md
  3. When a user says "we talked about this" or "check your memory", the model has to search the filesystem blindly — it doesn't even know the path pattern (~/.claude/projects/-<encoded-cwd>/memory/MEMORY.md)

Related issue: #23341 reports that memories go to MEMORY.md instead of CLAUDE.md. This issue is about the fact that even if MEMORY.md is the intended location, its contents are never injected into context.

What Should Happen?

Either:

  1. Load MEMORY.md into the system prompt alongside CLAUDE.md files (preferred — this is the whole point of saving memories)
  2. Or add an instruction in the system prompt telling the model about MEMORY.md and its path pattern, so it can proactively check it when relevant

Steps to Reproduce

  1. Open Claude Code in a project
  2. Save a memory: # Always bump plugin versions in both marketplace.json and plugin.json
  3. Verify it's saved to ~/.claude/projects/<encoded-path>/memory/MEMORY.md
  4. Start a new conversation in the same project
  5. Ask the model "what do you know about version bumping?" — it has no idea
  6. Ask the model to inspect its system prompt — MEMORY.md is not mentioned anywhere

Error Messages/Logs

No error — the model simply has no awareness of MEMORY.md contents.
The system prompt only includes:
- Contents of ~/.claude/CLAUDE.md (user's private global instructions)
- Contents of <project>/CLAUDE.md (project instructions)

Claude Model

claude-opus-4-6

Is this a regression?

Not sure / Not applicable

Last Working Version

_No response_

Claude Code Version

2.1.38

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

The MEMORY.md path uses an encoding pattern where / is replaced with - in the CWD path, e.g.:

  • CWD: /Users/foo/Projects/MyApp
  • Memory: ~/.claude/projects/-Users-foo-Projects-MyApp/memory/MEMORY.md

The model can discover this by globbing ~/.claude/projects/*/memory/MEMORY.md, but it has no instruction to do so.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗