[BUG] Loading randomly rules into Memory (STRANGE obsession on specific file - even rename or replace) with wildcards
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?
I check my /context and found unwanted memories.
I checked file and it has:
---
paths:
- model/basic_attention_multi_head_v3/**/*
---
So should loaded only on demand.
But I FOUND SOMETHING MORE STRANGE.
I replace this file content with similar file for 'v4' - v4 is not loading.
STILL LOADED!
I change folder name for v3 to v33 /memory after restart shows that it is LOADED.
- so I broke references if any
I change folder name for v3 to v733 /memory after restart shows that it is LOADED.
- so I broke pattern references if any
Whatever I do with this file it is load - no name change matter no path matter - how it is possible - hard disk link?
I code 10 years but I found first such strange BUG.
It is like Claude have some OBSESSION - rename of file not helps, replace content not helps, rename and replace file not helps - ONLY helps move outside _rules???
What Should Happen?
if it have wildcard should be not loaded with claude loading.
---
paths:
- model/basic_attention_multi_head_v3/**/*
---
Error Messages/Logs
2026-04-01T12:55:01.796Z [DEBUG] Loaded 3 CLAUDE.md/rules files:
[Project] C:\Users\Cezary Wagner\PycharmProjects\ai_stock_models\.claude\rules\general-v13.md (2815 chars)
[Project] C:\Users\Cezary Wagner\PycharmProjects\ai_stock_models\.claude\rules\model\basic_attention_multi_head_v733-2\general-v2.md (2332 chars)
[AutoMem] C:\Users\Cezary Wagner\.claude\projects\C--Users-Cezary-Wagner-PycharmProjects-ai-stock-models\memory\MEMORY.md (2787 chars)
As you see file is renamed and inside it pasted test from other file:
---
paths:
- model/basic_attention_multi_head_v4/**/*
---
Nothing helps apart delete or move.
Steps to Reproduce
No idea if reproducible.
- Create: .claude/rules/model/basic_attention_multi_head_v3/general-v2.md
- Write.
---
paths:
- model/basic_attention_multi_head_v3/**/*
---
...
- rename .claude/rules/model/basic_attention_multi_head_v3/general-v2.md -> .claude/rules/model/basic_attention_multi_head_v33/general-v2.md
- rename .claude/rules/model/basic_attention_multi_head_v3/general-v2.md -> .claude/rules/model/basic_attention_multi_head_v733/general-v2.md
- replace:
---
paths:
- model/basic_attention_multi_head_v4/**/*
---
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.1.89
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PyCharm terminal
Additional Information
<img width="2107" height="586" alt="Image" src="https://github.com/user-attachments/assets/447490a4-890e-4cd0-a52d-a4771a8de52d" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗