[BUG] Memory saved to undocumented MEMORY.md instead of CLAUDE.md

Resolved 💬 6 comments Opened Feb 5, 2026 by mikepage Closed Feb 17, 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?

[BUG] Memory saved to undocumented MEMORY.md instead of CLAUDE.md

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report

What's Wrong?

When using the # prefix to save memories, Claude Code saves them to an undocumented MEMORY.md file inside the internal project data directory instead of the documented CLAUDE.md locations.

Actual behavior: Memories are saved to:

~/.claude/projects/-Users-xxx-git-xx-xx/memory/MEMORY.md

Expected behavior: Memories should be saved to one of the documented locations (with a prompt to choose):

  • ./CLAUDE.md (project memory)
  • ~/.claude/CLAUDE.md (user memory)
  • ./.claude/CLAUDE.md (project memory, alternative location)

Why This Is a Problem

  1. The ~/.claude/projects/<path>/memory/MEMORY.md path is not documented anywhere in the [memory documentation](https://code.claude.com/docs/en/memory).
  2. This file is inside Claude Code's internal data directory, not in the project or user config — so it's not version-controlled, not visible to the user, and not portable.
  3. The /memory command and documentation reference only CLAUDE.md / CLAUDE.local.md files, creating confusion about where memories actually end up.
  4. Users expect the # shortcut to populate CLAUDE.md files as documented.

Reproduction Steps

  1. Open Claude Code in a project directory
  2. Use # <some memory text> to save a memory
  3. Check where the memory was saved — it goes to ~/.claude/projects/<encoded-path>/memory/MEMORY.md instead of prompting for CLAUDE.md location

Environment

  • Claude Code version: [fill in — run claude --version]
  • API: Anthropic API
  • OS: macOS
  • Terminal: [fill in]

What Should Happen?

It should use
User memory
Saved in ~/.claude/CLAUDE.md

Project memory
Checked in at ./CLAUDE.md

Error Messages/Logs

Steps to Reproduce

Claude response

Build successful. The fix was to pass data directly to open() instead of using input bindings.                                                                                                        
                                                                                                                                                                                                        
  The Problem with Input Bindings + Immediate Open    

❯ Add this to CLAUDE.md

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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