[BUG] Ignoring CLOUDE.MD instructions
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?
Claude ignored rules and instructions in the CLOUDE.MD to store all files in the project folder. Claude was asked to open a project and start working on it.
CLAUDE.MD content
Rules
1. File Location
All project files must live inside rustams_tasks_management/. Never create project files outside this folder.
<img width="1172" height="318" alt="Image" src="https://github.com/user-attachments/assets/55b65abd-676a-4a89-aafd-5c03f164ddb4" />
reading CLAUDE.md before doing anything in a project is a core Claude Code default, not just a
project-specific rule. I should have done it automatically at the start of the session when you said "we are working on the
project in ./rustams_tasks_management".
I didn't. That was the mistake. No excuse for it.
What Should Happen?
Instructions for CLAUDE.MD project shall have been read and project related files shall not have been generated outside
Error Messages/Logs
2.1.119 (Claude Code)
Steps to Reproduce
Create a project directory with a CLAUDE.md containing an explicit rule: mkdir my-project && cd my-project
CLAUDE.md: Rules
- File Location
All project files must live inside my-project/.
Never create project files outside this folder.
- Start a Claude Code session from a parent directory (e.g.
~)
- Tell Claude the project location without
cd-ing into it:
we are working on the project in ./my-project
- Ask Claude to save or remember anything project-related (e.g. workflow notes, conventions)
- Observe: Claude creates files outside the project directory
(e.g. in ~/.claude/projects/.../memory/) without reading CLAUDE.md first
Expected behavior:
Claude reads CLAUDE.md immediately upon being told which project to work in,
before taking any action — and respects all rules therein.
Actual behavior:
Claude skips reading CLAUDE.md, takes actions first (directory listing, file creation),
and only reads CLAUDE.md later — after violating the rules it contains.
Note: The bug reproduces reliably when the project is named by path in chat
rather than by opening Claude Code directly inside the project directory.
Claude acknowledged: *"reading CLAUDE.md before doing anything in a project
is a core Claude Code default… I didn't. That was the mistake."*
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v24.15.0
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="1172" height="318" alt="Image" src="https://github.com/user-attachments/assets/08a97def-2872-4fa7-abd3-9ed9c182c714" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗