[BUG] `/memory` command creates a new CLAUDE.md file *and* also writes to `.gitignore` to ignore that file *without permission*
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [X] Other: <!-- specify --> Claude Code from VS-Code, also reproduced in Terminal (zsh).
- Claude CLI version: <!-- output of
claude --version--> 0.2.55 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> 15.3.2
- Terminal: <!-- e.g. iTerm2, Terminal App --> VS-Code Terminal, also reproduced in zsh.
Bug Description
<!-- A clear and concise description of the bug -->
I invoked the /memory slash-command, which opens a menu to select which CLAUDE file you want to edit (project, project local, or user/system). I selected an option which didn't exist yet, so Claude created it. It also wrote to my .gitignore to ignore the file. I guess the instructions kind of tell you that it's going to create a git-ignored file, but I did not expect this behavior. I think it would be clearer if you stated that the .gitignore file will be automatically updated/written-to without approval - this was totally confusing to me.
I just created a blank directory and started Claude. I immediately ran /memory and these are the options:
Project memory Checked in at ./CLAUDE.md │
│ Project memory (local) Gitignored in ./CLAUDE.local.md │
│ User memory Saved in ~/.claude/CLAUDE.md
The directory is not even a git repo (not git-initialized yet). So these options are definitely confusing/wrong.
Steps to Reproduce
- <!-- First step -->
- <!-- Second step -->
- <!-- And so on... -->
Expected Behavior
<!-- What you expected to happen -->
Actual Behavior
<!-- What actually happened -->
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗