github alexgreensh/token-optimizer v2.4.1
v2.4.1: Critical fix for premature compaction

latest releases: openclaw-v2.4.1, v5.6.4, v5.6.2...
one month ago

Critical Fix: Premature Compaction

CLAUDE_AUTOCOMPACT_PCT_OVERRIDE is an undocumented Claude Code env var with inverted semantics. The value represents remaining% (not used%), so setting it to 85 triggers compaction at 15% used, silently destroying your session.

Token Optimizer now auto-removes this env var on every session start. If you had it set, your next session will use the correct default (~98% used).

What changed

  • Auto-fix on SessionStart: ensure-health hook removes harmful env vars automatically
  • Doctor/Quick checks: Both commands detect and remove CLAUDE_AUTOCOMPACT_PCT_OVERRIDE
  • Status bar redesign: Shows effort level (lo/med/hi), renames Q: to ContextQ:, reads model name dynamically
  • Docs updated: All references to this env var now warn against setting it

Status bar format

Opus 4.6 | hi | my-project | ████░░░░░░ 34% | ContextQ:82 | Compacts:1(~65% lost)

Upgrade

Plugin users: auto-updates on next session.
Script users: git pull in your token-optimizer directory.

Don't miss a new token-optimizer release

NewReleases is sending notifications on new releases.