Skip to content

Claude desktop app

The Token Optimizer plugin adds a status bar above the prompt in the Claude desktop app. It shows session quality, context, cache and limits at a glance, and puts Clean up, Start fresh and Keep warm one click away.

  • The Token Optimizer plugin (see Claude Code (CLI)). The status bar is part of it.
  • Claude Code 2.1.287 or newer.
  • Anthropic’s mods feature. Anthropic can switch it off remotely. When it is off, nothing breaks and the bar simply does not appear.

Nothing extra. Install or update the Token Optimizer plugin and open a new session in the desktop app; the bar appears above the prompt.

  • One sentence about the most urgent thing, with at most one button.
  • Five marks: quality grade, context fill, cache countdown, 5-hour limit, weekly limit. Hover any mark for a card.
  • The arrow beside Clawd unfolds one more line: branch, session time, tool calls, compactions (when any), and when the last checkpoint was saved (any kind, or a relevant one from an earlier session). When the savings figures cannot be read or are still being counted, it says so there.
  • The green savings chip shows what you have saved since install, in both band sizes, when there is a figure to show and nothing on the bar needs your attention. A press opens the dashboard.
  • Clawd acts out what the session is doing: thinking, reading, typing, subagents, waiting for your permission, writing, compacting, done, stopped, API error, cold cache, napping.

After the five marks there is a plain text link, Dashboard ↗, in both the full and the slim band, folded or unfolded. A click regenerates the Token Optimizer dashboard and opens it in your default browser, the same as the token-dashboard skill. While it runs the band says “Opening the dashboard.”; if it cannot, it says “Could not open the dashboard.” for a few seconds and nothing else happens. Clicking again while it is still opening is ignored.

  • Clean up compacts with Token Optimizer’s guidance, the same as typing /compact.
  • Start fresh asks for a second click, then saves a checkpoint, clears, and hands the checkpoint to your first message.
  • Keep warm is a manual, one-click cache refresh. It is offered only while the cache is still warm and its lifetime has been measured. The button never runs on its own, disappears when the cache expires, and uses a small amount of your usage. Afterwards it tells you how many tokens it re-read from the cache and that the countdown is back to full. It is separate from automatic Keep-Warm, which is on inside a daily limit after its terminal notice.

The countdown prefers the native Claude Code prompt_cache object when bridged by the terminal status line (v2.1.251+). Otherwise it falls back to a session-anchored estimate: 1 hour on Claude plans or 5 minutes on the API. Native cache state covers the main conversation, not subagents.

Six switches, set in the env block of ~/.claude/settings.json like the other Token Optimizer switches:

  • "TOKEN_OPTIMIZER_STATUS_BAR": "0" hides the bar.
  • "TOKEN_OPTIMIZER_STATUS_BAR_ANIMATE": "0" keeps Clawd still.
  • "TOKEN_OPTIMIZER_STATUS_BAR_CARDS": "0" turns off the hover cards on the marks. The desktop gives a mod no hover delay, so this is the way to stop them popping up as the pointer crosses the band. The Clean up, Start fresh and Keep warm buttons live on those cards, so they are not reachable from the band while the cards are off.
  • "TOKEN_OPTIMIZER_STATUS_BAR_SAVINGS": "0" hides the green savings chip, in both sizes. The dashboard and the savings figures are unchanged.
  • "TOKEN_OPTIMIZER_STATUS_BAR_SIZE": "slim" starts the band as one line instead of the full band. The – button beside the arrow shrinks it and + brings it back. The arrow still unfolds the details row under it, and the choice is remembered across sessions and restarts.
  • "TOKEN_OPTIMIZER_STATUS_BAR_TIME_FORMAT": "24h" (or "12h") forces the clock used for limit renewal times. Unset, they follow your locale.

The “hook was skipped” notice on managed machines

Section titled “The “hook was skipped” notice on managed machines”

On a machine with managed settings, or a Team or Enterprise login, Claude Code seats a built-in guard (cc-plugin-sec-default) ahead of every plugin you install. The guard sends every settings-hook event (classic.*) past installed plugins, so those handlers never run. Claude Code then tells you once per session and event:

token-optimizer: its classic.SessionStart hook was skipped. “cc-plugin-sec-default” runs first and sent the event on past it.

Both parts are Claude Code behavior: the guard’s rule is in its public source and the notice is raised by Claude Code. An organization cannot reorder a plugin installed from a marketplace ahead of the guard, so Token Optimizer cannot move itself either.

Token Optimizer registers two settings-hook handlers and no others, so you see at most two of these notices: classic.SessionStart at the start of a session, and classic.PermissionRequest the first time Claude asks for a permission.

What the skipped handlers cost the status bar, read from the module’s code:

  • classic.SessionStart: after /clear, the bar does not learn the new session id from this event, so it can keep the old session’s figures until its next refresh. Start fresh’s hand-off still reaches your first message. The transcript path it carries is an optional hint; without it Token Optimizer looks the session up by id.
  • classic.PermissionRequest: Clawd does not switch to “waiting for your permission”.

Your hooks in hooks.json (compression, checkpoints, quality scoring) are a separate path and keep running. Neither handler can be dropped without losing these behaviors on machines with no guard, and Claude Code lets a plugin register hooks only while it loads, so a plugin cannot register them only when the guard is absent.

The Claude desktop app only. The terminal keeps its existing status line. VS Code is not supported.

Add "TOKEN_OPTIMIZER_STATUS_BAR": "0" to the env block of ~/.claude/settings.json and start a new session. The rest of Token Optimizer keeps working.

  • The quality status line for the terminal version.
  • Keep-Warm for reporting and automatic pings (on inside a daily limit after the terminal notice, or after keepwarm-decide set on).