[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 (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
- The
~/.claude/projects/<path>/memory/MEMORY.mdpath is not documented anywhere in the [memory documentation](https://code.claude.com/docs/en/memory). - 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.
- The
/memorycommand and documentation reference onlyCLAUDE.md/CLAUDE.local.mdfiles, creating confusion about where memories actually end up. - Users expect the
#shortcut to populateCLAUDE.mdfiles as documented.
Reproduction Steps
- Open Claude Code in a project directory
- Use
# <some memory text>to save a memory - Check where the memory was saved — it goes to
~/.claude/projects/<encoded-path>/memory/MEMORY.mdinstead of prompting forCLAUDE.mdlocation
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_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗