[BUG] Model changes the user's established procedure and memory rules without being asked

Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 3 comments · opened Oct 3, 2026

Re-filing #97134, closed as needing more information.

Environment

  • Claude Code: 2.1.280
  • Model: claude-opus-5-5[1m]
  • OS: macOS 26.6.2
  • Instructions loaded: project CLAUDE.md plus auto-memory MEMORY.md (both present in context at session start)

Steps to reproduce

  1. Keep a written PR-review procedure in auto-memory (MEMORY.md and linked files), owned and edited by the user.
  2. Over a long session, correct the model several times on the same procedure.
  3. Observe the model's edits to memory files and its proposals.

Actual

The model proposes or makes changes to the user's procedure/memory rules without being asked (rewording steps, adding new rules, changing how steps apply). The user has to tell it to stop changing the process.

Expected

User-owned procedure files are read and applied, never edited unless the user explicitly asks for an edit.

Raised with Claude Code

View original on GitHub ↗

3 Comments

stonianua · 9 days ago

One thing that may be part of this: auto memory (MEMORY.md and its topic files under ~/.claude/projects/<project>/memory/) is designed as Claude's own notebook. The docs describe it as notes Claude writes itself from your corrections, so in a long session full of corrections on the same procedure, rewriting those files is roughly what it's built to do.

For a procedure you own, these make the rule enforced (or at least visible) rather than advisory:

  1. Move the procedure out of auto memory into CLAUDE.md or a rules file like .claude/rules/pr-review.md, and leave auto memory for Claude's own notes (or set "autoMemoryEnabled": false in that project's settings).
  2. Deny edits to it in .claude/settings.json. Edit rules also cover Write:

``json
{ "permissions": { "deny": ["Edit(./CLAUDE.md)", "Edit(./.claude/rules/**)"] } }
``

  1. If you'd rather Claude get told why, add a PreToolUse hook with matcher Edit|Write that exits 2. Its stderr goes back to Claude, so it proposes the change instead of making it:

``sh
#!/bin/sh
f=$(jq -r '.tool_input.file_path // empty')
case "$f" in
*/CLAUDE.md|*/.claude/rules/*)
echo "$f is user-owned. Propose the change to the user instead of editing it." >&2
exit 2 ;;
esac
exit 0
``

  1. Keep the file in git so any change shows up in git diff.

That still leaves the model-side bug of proposing unrequested rewrites in chat, but it stops silent edits from landing. For triage, it'd help to know whether the changes went through visible Edit/Write tool calls or showed up only as "Saved N memories".

Nahuel990 · 9 days ago

@stonianua reported as spam. If you work for anthropic I expect formal communication from an Anthropic account.

stonianua · 9 days ago

Not affiliated with Anthropic. I'm an independent developer, and that was just a suggested workaround, not an official response. Sorry for the noise, I'll stay out of the thread.