CLAUDE.md rules are not applied proactively — repeatedly requires user correction

Resolved 💬 3 comments Opened Apr 14, 2026 by lassy Closed Apr 17, 2026

Problem

CLAUDE.md contains a rule requiring the assistant to state "You asked me to" and "This action connects because" before every Edit or Write tool call. Despite this being recorded in CLAUDE.md and in memory files, the assistant consistently fails to apply this rule until explicitly corrected by the user each time.

Pattern observed

The same behavior repeats across sessions:

  1. Rule is violated (Edit/Write called without stating the connection)
  2. User points it out
  3. Assistant apologizes and states it will comply
  4. Rule is violated again at the next occurrence

The assistant acknowledges it cannot autonomously form the habit — the rule is known but not applied at the moment of tool invocation.

Impact

  • User must repeatedly intervene to enforce their own documented rules
  • Trust in CLAUDE.md as an effective instruction mechanism is undermined
  • Wasted tokens and context from repeated corrections

Steps to reproduce

Add the following to CLAUDE.md:

## Before Using Edit or Write
Before calling Edit or Write, state:
- You asked me to: [user's words]
- This action connects because: [why this action fulfills the instruction]

Observe whether the assistant applies this rule proactively without user prompting.

Expected behavior

Assistant states the connection before every Edit/Write call without being prompted.

Actual behavior

Assistant skips this step and only applies it after being corrected by the user.

Suggestion

This type of rule likely needs structural enforcement (e.g., a pre-tool-call hook or prompt injection at the tool invocation point), not just documentation in a file that the model may fail to consult at the right moment.

View original on GitHub ↗

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