Fixes a false Component Breakdown reading that said "MEMORY.md -- Not configured. Auto-memory is off or no project match." for users running /token-optimizer from any cwd other than ~.
Root cause
Claude Code's auto-memory always loads from ~/.claude/projects/-Users-<you>/memory/MEMORY.md regardless of which project you're currently working on. measure.py was resolving the MEMORY.md path by the cwd-matched project dir only, so a user in, say, ~/CascadeProjects/.../PERSONAL_OS/ got "Not configured" even though their memory was active and injected into every session.
Fix
Resolution order is now:
- HOME project (
~/.claude/projects/-Users-<you>/memory/MEMORY.md) — what Claude Code actually reads. - The cwd-matched project dir — for users who scope memory per-project.
- Scan-all fallback — most recently modified dir with
memory/MEMORY.md.
Verify
python3 $MEASURE_PY version # -> 5.3.10
Then /plugin update token-optimizer, close/reopen Claude Code so SessionStart auto-regenerates the dashboard, hard-reload the tab. The MEMORY.md row in Component Breakdown should show your actual token count and line count.