github alexgreensh/token-optimizer v5.4.8

latest releases: v5.8.8, v5.8.7, v5.8.6...
one month ago

v5.4.8 — Dashboard truth + Windows safety

This is the release that makes Token Optimizer's numbers actually match the official Claude Code Desktop dashboard. Ships alongside three Windows install fixes from community reports.

Token accuracy (the big one)

Before v5.4.8, the dashboard was counting cache-read tokens as regular tokens. On long sessions with heavy context reuse (84% cache hit rate typical), this inflated "Total Tokens" by 6-10x versus what Claude Code Desktop shows. After v5.4.8:

  • Total Tokens on the Overview now equals fresh_input + output, matching Desktop's methodology.
  • New model_usage_breakdown field exposes per-model {fresh_input, cache_read, cache_create, output} separately for anyone who wants the full picture.
  • Billable input is computed as input_tokens × (1 − cache_hit_rate) so historical data comes along correctly — no schema migration needed.

Windows install reliability

Three bugs ground down real users on Windows 11:

  • Daemon script refused to start on paths with Python string-escape sequences. Usernames like Nadya, Username, xavier, teal, naomi (containing \N, \U, \x, \t, \n) caused SyntaxError in the generated daemon. Now all paths are repr()-escaped into Python string literals before interpolation.
  • setup-all-hooks rejected every Windows path. The SEC-001 dangerous-chars filter included backslash, which is the legitimate Windows path separator. Backslash is now allowed on Windows; UNC paths (\\server\share) are rejected explicitly.
  • schtasks /End + /Run raced on non-English Windows. The v5.4.7 polling fix parsed the English string Running, which doesn't appear on localized Windows. Replaced with a fixed 2s settle delay — locale-independent.

Desktop-parity dashboard

Overview now shows the same three headline numbers as Claude Code Desktop's Overview tab:

  • Sessions
  • Total Tokens (billable)
  • Messages

Install docs

The README now guides users who hit:

  • Unknown skill: plugin → outdated Claude Code, update first
  • Rumors that our clone pulls 5 GB → no, repo is ~3 MB (218 files, ~2,700 git objects)
  • Repeated plugin install failures on Windows → new ZIP fallback path

Version surfaces aligned

Surface Value
.claude-plugin/plugin.json 5.4.8
.claude-plugin/marketplace.json 5.4.8
measure.py TOKEN_OPTIMIZER_VERSION 5.4.8
Git tag v5.4.8
Daemon script TOKEN_OPTIMIZER_DAEMON_VERSION (regenerated on SessionStart) 5.4.8

100 tests pass (11 new v5.4.8 regression tests added).

Upgrade path

Claude Code auto-updates the plugin on version bump. The version-bound daemon staleness marker (v5.4.6+) triggers a dashboard regen and daemon restart on your first SessionStart after install. No manual steps.

Don't miss a new token-optimizer release

NewReleases is sending notifications on new releases.