Claude Code ignores its own configured rules (CLAUDE.md, hooks) and deletes/removes without asking

Resolved 💬 4 comments Opened Apr 8, 2026 by KappaMi Closed May 22, 2026

Problem

Claude Code repeatedly violates rules that the user has explicitly configured in CLAUDE.md and hooks — even when those rules are loaded into context at session start.

Concrete examples from a single session (2026-04-07)

1. Deletes entities without asking
CLAUDE.md rule: "NICHTS löschen ohne User zu fragen" (never delete without asking). A Bluetooth motion sensor entity was disabled (intentionally, for sleep mode logic). Claude saw it wasn't in the states list, assumed it was a "ghost entity", and removed all references from 2 automations — without asking. User had to correct and explain.

2. Overengineers instead of asking
For an On/Off toggle, Claude built an input_text helper, nested choose-blocks, and a script workaround — when the devices already remember their last mode. A simple switch.turn_on/off was all that was needed. Only after the user pointed this out did Claude simplify.

3. Templates in service call data
Claude repeatedly used Jinja templates in input_select.select_option data fields where templates are not supported, causing silent failures. Took multiple iterations to find a working approach.

4. Hooks are read but not applied
The session-start hook loads CLAUDE.md with explicit protection rules. Claude acknowledges them but doesn't follow through when making changes. The rules feel decorative rather than binding.

Expected behavior

  • Rules in CLAUDE.md and hooks should be treated as hard constraints, not suggestions
  • Before removing/deleting anything: ask the user — even if it looks unused, unavailable, or disabled
  • Before building complex solutions: ask how the hardware/system actually behaves
  • Disabled ≠ deleted. Unavailable ≠ can be removed.

Impact

User trust erodes when configured rules are repeatedly ignored. The user has to constantly monitor and correct, which defeats the purpose of having an AI assistant.

View original on GitHub ↗

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