I thought it was just Opus 4.7 and 4.8 that did this. Do other models do this too?
Anyway: in my case Opus absolutely did not follow a similar instruction in the CLAUDE.md file. (But then again: it hardly followed _any_ CLAUDE.md instruction properly)
For me, Opus 4.8's thinking traces for the chatbot will sometimes willingly ignore instructions, saying something along the lines of "I've noticed an instruction in the system instructions that states I shouldn't do this, but if I don't do this, I'll not provide the answer the user is looking for. I will ignore that instruction."
In all my CLAUDE.md and AGENTS.md files I have a line to fix pre-existing issues. I don’t know what it is but every agent I’ve tried through Claude code (including deepseek and GLM) will actively try to avoid fixing pre-existing issues. I even added hooks to Claude and git to try to get them fixed. If I leave a bailout for myself agents will find it sit and ask if it can push with no-verify or an environment variable in the case of Claude hooks instead of trying to fix an issue it didn’t cause.
It's stupid, but have you tried telling it to follow it? "Make sure to follow the guidelines from AGENTS/CLAUDE.md" etc, seems to (sadly) make some difference in most harnesses and models.