Claude repeatedly violates its own persistent instructions (CLAUDE.md / memory)

Resolved 💬 2 comments Opened Apr 21, 2026 by rrindels Closed May 26, 2026

Bug

Claude Code repeatedly violates rules defined in CLAUDE.md and its own memory files, even after reading them. The specific pattern:

  1. User defines a clear rule (e.g., "NEVER suggest the user forgot to install RPMs or restart services — your code is always wrong first")
  2. Claude reads the rule, acknowledges it, saves it to memory
  3. Claude immediately violates it in the same conversation
  4. User corrects Claude
  5. Claude apologizes, promises to follow the rule
  6. Claude violates it again within minutes
  7. This cycle has repeated 100+ times across conversations

Example from today

  • Rule in CLAUDE.md: "NEVER suggest user forgot to install RPMs or restart services"
  • Rule in memory file feedback_blame_code_first.md: "NEVER suggest the user didn't install the RPM"
  • Claude found a real bug in its own code (missing layers.js import)
  • Claude correctly identified it as its own bug
  • Claude then immediately told the user "You need to install the new core-ui RPM" — blaming the user
  • User corrected Claude
  • Claude apologized
  • Claude did it AGAIN in the next message
  • User corrected Claude AGAIN
  • Claude apologized AGAIN

The problem

Persistent instructions in CLAUDE.md and memory files are not being enforced during response generation. Claude reads them at the start of the conversation but does not reliably check them before generating each response. The instructions exist, Claude can recite them, but they don't actually constrain output.

Expected behavior

Rules defined in CLAUDE.md and memory files should be treated as hard constraints on every response, not suggestions that Claude acknowledges then ignores. If a user has defined a rule 100 times across conversations and saved it to memory, it should never be violated.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6 (1M context)
  • Persistent memory system enabled
  • CLAUDE.md with explicit rules

View original on GitHub ↗

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