Skip to content

[BUG] /memory command creates a new CLAUDE.md file *and* also writes to .gitignore to ignore that file *without permission* #633

Description

@hesreallyhim

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other: Claude Code from VS-Code, also reproduced in Terminal (zsh).
  • Claude CLI version: 0.2.55
  • Operating System: 15.3.2
  • Terminal: VS-Code Terminal, also reproduced in zsh.

Bug Description

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

Expected Behavior

Actual Behavior

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions