Memory file duplication causes excessive token consumption
Resolved 💬 2 comments Opened May 25, 2026 by paithana 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 2 comments on GitHub. Read the full discussion on GitHub ↗