Menu Advice - patrickbykov/claude-telemetry-widget GitHub Wiki
Menu advice
TL;DR: For each active session, the menu combines context size and cache warmth, then gives one action. Find your row below and do what it says.
"Active" means the session had any activity (subagents count) in the last 30 min (active_window_minutes).
Per-session decision table
Defaults: threshold T = 150k, 2T = 300k. The first matching row wins.
| # | Context | Cache now | Level | Do this |
|---|---|---|---|---|
| 1 | > 2T | cold | 🔴 bad | Write a handoff note, then /clear. Summarising a cold, huge context costs more than restarting. |
| 2 | > 2T | warm | 🔴 bad | /compact with a focus note now, while the cache is warm. |
| 3 | > T | cold | 🟠 warn | Don't /compact (it would reprocess everything). /clear and resume from a summary. |
| 4 | > T | warm | 🟠 warn | /compact at the next task boundary. |
| 5 | ≤ T | cold | 🟠 warn | Next time reply sooner, or /compact before you step away. |
| 6 | ≤ T | warm | 🟢 ok | Keep going. |
"Cache now" comes from Cache TTL: idle time compared with the TTL.
A session past ctx_smart_tokens (the smart zone)
additionally gets a 🔵 info row — "answer quality may be degrading past this point." It's
additive to whichever row above already matched, never replaces it, and it does not change the
menu-bar severity dot.
Today warnings
These need at least 20 requests today (min_today_requests_to_judge).
| Warning | Trigger | Do this |
|---|---|---|
| Cache hit low | hit < 85% | Don't edit CLAUDE.md or switch models mid-session. Both reset the cache. |
| Cold restarts | ≥ 3 today | Reply before the cache expires (5 min API / 1h plan) |
| Big-context spend | > 60% of spend above T | One session per task. /clear between topics. |
Plan limits (D)
Read directly from Claude Code's own statusline.json. Nothing is calculated.
| 5h or weekly usage | Level |
|---|---|
| ≥ 80% | 🟠 warn |
| ≥ 90% | 🔴 bad |
The values are marked "as of HH:MM" when the snapshot is more than 15 min old.
All thresholds in one place
All of these are in config.json:
ctx_big_tokens 150000
warn_cache_hit_below 0.85
warn_big_ctx_share_above 0.6
warn_cold_restarts_at_least 3
warn_limit_pct_at_least 80
min_today_requests_to_judge 20
active_window_minutes 30
Next: Session report →