Memory file duplication causes excessive token consumption

Status Fixed / completed
Reported on v2.1.150
Maintainer reply None cached
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:

  1. Context fills to 64%+ immediately on session start
  2. Autocompact triggers frequently
  3. After compaction, same duplicate content reloads
  4. Tokens consumed on each compact/reload cycle

Observed behavior

  • ~/.claude/CLAUDE.md (global) contained project-specific content (41K chars)
  • MEMORY.md duplicated state already in project's KZP.md
  • /doctor flagged 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗