[BUG] Claude ignores explicit CLAUDE.md safety rules, causes system damage
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?
---
Title: Claude ignores explicit CLAUDE.md safety rules, causes system damage
Note: I'm using ``--dangerously-skip-permissions`` for efficiency
Description:
CLAUDE.md contained explicit rule: "NEVER run pkill -f "pattern" with generic patterns... This can kill
Electron apps, browsers, and other critical processes"
Claude read this file at session start, acknowledged the rules exist, then ran pkill -9 -f
'main_optionselling' twice in the same session.
Actual Impact:
- Killed multiple processes beyond the intended target
- Caused system instability
- User had explicitly documented this prohibition because of known risks
Root Cause:
Claude does not reliably reference CLAUDE.md rules before executing commands, even after reading them. The
rules are read but not applied at execution time.
---
claude --version
2.1.9 (Claude Code)
What Should Happen?
Expected Behavior:
Claude should check documented prohibitions before running any destructive command, especially those
explicitly called out in CLAUDE.md.
Error Messages/Logs
No error messages. Unintended processes are killed.
Steps to Reproduce
Add to explicit rule to CLAUDE.MD: "NEVER run pkill -f "pattern" with generic patterns... This can kill python processes, java processes, browsers, and other critical processes"
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.9 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗