[BUG] CLAUDE.md rules violation (no /compact was used whatsoever!!!)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I created rules in CLAUDE.md which should act as a harness when executing tasks. Claude is always skipping those rules, for example:
Existing rule: "When the user requests a STOP - STOP the execution. Do not take initiative. Wait for explicit next instruction" - After I stopped the execution (it was going in circle) it continued running the previous script.
Existing rule: "Do not ask the user to execute/do tasks that you can do/execute" - He just asked me to execute a script created by it.
Existing rule: "NEVER ask for permission you clearly already have, first check if you have permissions and only ask for what is needed" - It already ran a script and the second time, it asked again for permissions to run the same script, from the same location exactly. Also, it asked for permissions on drive D:\ and it performed a first action on D:\, but right after that it performed an action on C:\ (without asking or receiving permissions for it). It tried to explain that the C:\ is public, and when confronted, it recognized that it was inventing an excuse.
Also, the missing of "Auto" mode made the entire situation worse!
It is frustrating to use a tool that seems to fight against you.
I asked ChatGPT to fix the script and it did it in less than 30 seconds, while Claude was going in circles for about 30 minutes.
What Should Happen?
Should ALWAYS follow the rules from CLAUDE.md!
Error Messages/Logs
no errors, just wrong behavior.
Steps to Reproduce
- set the rules in CLAUDE.MD
- run any task and observe the behavior.
Claude Model
Other
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.246 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_