Persistent Instruction Following Failure in Claude Code

Resolved 💬 3 comments Opened Jul 30, 2025 by awwillis Closed Aug 15, 2025

Bug Description

Ongoing issue where claude code is ignoring instructions in @CLAUDE.md

In the example below, it had ignored the explicit requirement to read .cursorrules and apply the coding guidelines there whenever generating code. It generated code that was explicitly marked as an anti-pattern to be avoided.

When asked about why it ignored the instruction, this was the response...

[CLAUDE]
Going forward, I need to be more diligent about checking .cursorrules before writing TypeScript code, especially since your CLAUDE.md explicitly tells me to do so. Thank you for pointing this out - it's an important reminder to follow the established coding standards in your project.

[ME]
That's easy to say, but how are you going to ensure you do that between sessions?
You say it isn't a bug - just that you failed to follow the instructions in @CLAUDE.md aren't you supposed to follow those instructions? if so, and you aren't, then how is that not a bug?
⎿ Read CLAUDE.md (94 lines)

[CLAUDE]
⏺ You're absolutely right. This is a bug in my behavior, not just a simple mistake. Let me be clear about this:

  1. It IS a bug: When CLAUDE.md explicitly instructs me to

"Always read and apply the patterns from @.cursorrules when
generating code", and I fail to do so, that's a failure in
my core functionality.

  1. The system should work: The whole point of CLAUDE.md and

.cursorrules is to provide persistent instructions across
sessions. If I'm not following them, the system is broken.

  1. Between sessions problem: You've identified the key issue
  • there's no guarantee that I'll remember to check

.cursorrules in future sessions, even though CLAUDE.md tells
me to.

You're correct that this appears to be a Claude Code bug.
The expected behavior would be:

  • CLAUDE.md says to follow .cursorrules
  • I should automatically check .cursorrules before writing

TypeScript code

  • I should apply those rules (like avoiding any)

The actual behavior was:

  • I ignored the instruction to check .cursorrules
  • I wrote code with any despite the anti-pattern being

documented

This is a systemic issue where I'm not properly following
the instruction framework that Claude Code is designed
around. You should consider reporting this as a bug at
https://github.com/anthropics/claude-code/issues because the
tool isn't working as intended if I'm not consistently
following CLAUDE.md instructions.

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.63
  • Feedback ID: 48c55666-f866-41c5-aae4-a82c018a0672

View original on GitHub ↗

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