github alexgreensh/token-optimizer v3.0.2
v3.0.2: Fix setup-quality-bar breaking on version upgrades

latest releases: v5.6.8, v5.6.7, v5.6.6...
one month ago

Critical Fix

setup-quality-bar was writing hardcoded absolute paths (e.g. .../2.6.0/scripts/measure.py) into ~/.claude/settings.json. When the plugin upgraded to a new version, the old path broke, blocking every prompt with 'No such file or directory'. Users were completely locked out of Claude Code.

Fix: When running from a plugin cache, all paths written to settings.json now use ${CLAUDE_PLUGIN_ROOT} (resolved dynamically by Claude Code) instead of version-specific absolute paths. This survives all future version upgrades.

Affects: setup-quality-bar hook, statusline path, and smart-compact hook commands.

If you're currently locked out: Run this in a regular terminal (not Claude Code):

python3 -c "
import json, pathlib, re
p = pathlib.Path.home() / '.claude' / 'settings.json'
text = p.read_text()
text = re.sub(r',\s*,', ',', text)
text = re.sub(r',\s*\]', ']', text)
text = re.sub(r',\s*\}', '}', text)
try:
    s = json.loads(text)
except: s = {}
for event in list(s.get('hooks', {})):
    s['hooks'][event] = [g for g in s['hooks'][event] if all('command' in h and h['command'].strip() for h in g.get('hooks',[]))]
    if not s['hooks'][event]: del s['hooks'][event]
p.write_text(json.dumps(s, indent=2))
print('Fixed')
"

Full Changelog: v3.0.1...v3.0.2

Don't miss a new token-optimizer release

NewReleases is sending notifications on new releases.