Memory file duplication causes excessive token consumption
Status Fixed / completed
Reported on v2.1.150
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened May 25, 2026 · closed May 26, 2026
Bug: Memory file duplication causes excessive token consumption
Version: 2.1.150
OS: Debian (Kali Linux)
Problem
Large CLAUDE.md and memory files with duplicate content cause:
- Context fills to 64%+ immediately on session start
- Autocompact triggers frequently
- After compaction, same duplicate content reloads
- Tokens consumed on each compact/reload cycle
Observed behavior
~/.claude/CLAUDE.md(global) contained project-specific content (41K chars)MEMORY.mdduplicated state already in project'sKZP.md/doctorflagged files but no automatic deduplication- Session used 127K/200K tokens (64%) with minimal actual work
Expected behavior
- Warning when global CLAUDE.md contains project-specific content
- Memory index should not duplicate imported CLAUDE.md content
- Autocompact should detect and skip duplicate content
Workaround
Manually trimmed:
- Global CLAUDE.md to 1K (user prefs only)
- MEMORY.md to index-only (no state duplication)
- Removed redundant @imports
Token impact
~30K tokens wasted per session on duplicate content loading
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗