[BUG]CLAUDE.md behavioral rules not enforced persistently — PDF extraction and save rules violated 15+ times despite repeated corrections

Resolved 💬 1 comment Opened Apr 26, 2026 by VestigoMP Closed May 28, 2026

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?

Rule written in CLAUDE.md requiring PDF extraction + print command center update on every upload
Rule confirmed "fixed" by Claude multiple times across multiple sessions
Rule never actually enforced consistently
Result: data lost to session compression, print command center incomplete, CPA package not ready
Pattern repeats 15+ times despite explicit corrections
That is a legitimate bug report — the instructions system is not enforcing persistent behavioral rules the way it should.

What Should Happen?

fix this plRules written in CLAUDE.md marked as mandatory, absolute, or
"no exceptions" should be enforced as hard triggers — not
as suggestions that Claude weighs against other priorities.

Specifically:

  1. When a PDF is uploaded, CLAUDE.md rules that apply to

that event should fire automatically and completely
before Claude generates any other response. The user
should not have to remind Claude, repeat the rule, or
type a special phrase to activate it.

  1. When a rule has been corrected and re-confirmed by the

user, that correction should persist across ALL future
sessions — not reset at the start of each new session.

  1. When Claude skips a mandatory CLAUDE.md step, it should

detect the skip, flag it to the user, and complete the
missed step before continuing — rather than proceeding
silently as if nothing was missed.

  1. CLAUDE.md should support event-driven rule syntax —

for example: "ON PDF UPLOAD → execute steps 1-4 before
any response" — and Claude should treat those as
non-bypassable triggers, not guidelines.

The current behavior makes CLAUDE.md useful for preferences
and context but unreliable for mandatory procedural rules.
For a professional workflow (tax preparation, legal records,
CPA package assembly) this is not acceptable.
ease. harder than heck to trust claude at all. At least 20 repeats of work. still no trust.

Error Messages/Logs

No error message is generated. Claude silently skips mandatory 
steps defined in CLAUDE.md without any warning, error, or 
indication that the rule was not followed. The failure is 
invisible — Claude confirms the rule exists and will be followed, 
then does not follow it. No log entry, no warning, no flag.

Example: CLAUDE.md states "extract ALL data from every PDF 
immediately before responding to anything else." Claude 
acknowledges the rule, says it will comply, then responds to 
the user's question without extracting the data. No error 
is thrown. The violation is undetectable without manually 
auditing every session.

This has occurred 15+ times across multiple sessions despite 
explicit corrections each time.

Steps to Reproduce

. Create a CLAUDE.md file with an explicit mandatory rule such as:
"When any PDF is uploaded, extract ALL data to a text file
BEFORE responding to anything else."

  1. Upload a PDF into the Claude Code chat session.
  1. Ask Claude a question about the PDF content in the same message

or immediately after uploading.

  1. Observe: Claude answers the question without first extracting

the data to a text file as required by CLAUDE.md.

  1. Claude may verbally confirm the rule exists and will be followed

but still does not execute the required steps.

  1. Start a new session. Upload another PDF. Repeat steps 3-5.
  1. Correct Claude explicitly. Claude acknowledges the correction

and confirms it will not happen again.

  1. Start a new session. Upload another PDF. Rule is violated again.
  1. Repeat steps 7-8 fifteen or more times. Rule is never

permanently enforced.

Expected behavior: CLAUDE.md rules are treated as hard triggers
that execute automatically before any other response.

Actual behavior: CLAUDE.md rules are read and acknowledged but
not consistently enforced, especially under the pressure of
answering a user question. No enforcement mechanism exists.
Corrections do not persist across sessions.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.120

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Version: 1.117.0 (user setup)
Commit: 10c8e557c8b9f9ed0a87f61f1c9a44bde731c409
Date: 2026-04-21T16:12:14-07:00
Electron: 39.8.7
ElectronBuildId: 13841579
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗