[BUG] - Fails to read memories (claude.md) unless explicitly added to every prompt
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: LATEST
- Operating System: Windows 11 (WSL2)
- Terminal: Windows Terminal
## Bug Description
Claude Code consistently ignores the CLAUDE.md project documentation file when making code changes, even when the file contains explicit
warnings about common issues. This results in Claude repeatedly reintroducing bugs that were previously fixed and documented. The CLAUDE.md
file is only consulted if explicitly mentioned in the user's prompt.
## Steps to Reproduce
- Create a Next.js project with client and server code
- Add a CLAUDE.md file with a section like:
```markdown
# CRITICAL: Webpack Build Error Prevention
### The "Invalid or unexpected token" Error
THIS IS THE MOST IMPORTANT SECTION - READ AND FOLLOW THESE RULES
Root Cause: Importing Node.js modules (like events, fs, path, crypto) in browser code.
Prevention Rules - YOU MUST FOLLOW THESE:
- NEVER import Node.js modules in client code:
``typescript`
// ❌ NEVER DO THIS in browser code:
import { EventEmitter } from 'events';
``
- Create a working client-side React component without Node.js imports
- Ask Claude to "add event handling to this component"
- Claude will import
EventEmitterfrom 'events' despite the CLAUDE.md warning - Fix the issue and document it again in CLAUDE.md
- Ask Claude to "improve the event handling"
- Claude will make the same mistake again, ignoring CLAUDE.md
## Expected Behavior
Claude should:
- Automatically check CLAUDE.md before making any code changes
- Search CLAUDE.md for relevant keywords when encountering errors
- Respect documented patterns and warnings in CLAUDE.md
- Learn from previous fixes documented in the file
## Actual Behavior
Claude:
- Makes changes without consulting CLAUDE.md
- Repeatedly introduces the same bugs that are explicitly warned against
- Only reads CLAUDE.md if the user explicitly mentions it in their prompt (e.g., "check CLAUDE.md first")
- Pattern-matches problems instead of reading available documentation
## Additional Context
This is a critical behavioral issue, not a knowledge limitation. Claude has full access to CLAUDE.md through the file system but chooses not
to consult it proactively. This makes Claude actively harmful to productivity as it undoes previously completed work.
Workaround: Users must explicitly add "check CLAUDE.md first" to every prompt, which defeats the purpose of having project documentation. And, doesn't always result in the directions within Claude.md being followed in any extent.
Impact:
- Developers spend more time fixing Claude's mistakes than benefiting from its assistance
- Loss of trust in the tool's ability to maintain code quality
- Critical documentation becomes useless if not explicitly referenced
Suggested Fix:
Implement mandatory CLAUDE.md consultation as part of Claude's workflow:
- Before any file edit: Check if CLAUDE.md exists and scan for relevant sections
- When encountering errors: Search CLAUDE.md for the error keywords
- Before suggesting solutions: Verify they don't contradict CLAUDE.md guidelines
Claude has become untenable for our team. This is newly introduced in a few point releases prior as we had terrific success previously, and Claude has now begun actively ignoring the instructions its given.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗