You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every API fetch died instantly behind a trusted mitm proxy (cctrace,
corporate TLS inspection): the statusline inherits HTTPS_PROXY but curl
does not honor NODE_EXTRA_CA_CERTS, so TLS verification failed with
HTTP 000 and the quota froze behind a persistent !net — 19 consecutive
failures over 11 hours observed live, while the CLI kept working.
- curl_ca_bundle: splice the extra cert onto a copy of the system CA
bundle (curl has no additive flag), --cacert on all four requests
- record curl's %{errormsg} in the err file and debug log: cat
usage.err now says WHY (SSL/DNS/refused), not just code 000
- header parity with claude-cli 2.1.207 on all OAuth API calls
(UA "claude-cli/<ver> (external, cli)", anthropic-beta, Accept,
Accept-Encoding); spec doc re-synced, no schema change since 2.1.201
- unified +X/-X change flash (delta_flash): cost $7.90+.37, context
[30%]+9 / [3%]-27 after compact, scoped quota fb[69%]+2 — same
reverse-video idiom the 5h/7d bump already used
- STATUSLINE_NO_FETCH: render from cache/stdin only; exported by the
test harness so integration tests stop firing real fetches whose
background writes raced teardown (flaky rm -rf)
- gitignore .cctrace/ and .env
11 new tests (265 total).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ Every component earns its place:
80
80
| Time and cost | Track long sessions. Hours format above 60m (`1h30m`). |
81
81
| Model | Abbreviated: `claude-opus-4-8` becomes `opus4.8`, `claude-fable-5` becomes `fabl5`, `claude-sonnet-5` becomes `sonnet5`. The `[1m]` tag marks a 1M-context session, detected from the window the CLI reports (`context_window_size`) — not the name — so it shows even when Claude Code strips the `[1m]` suffix (which it does since 2.1.173 whenever 1M is the default; Sonnet 5 joined Fable 5 on that path in 2.1.197). |
82
82
| Effort | Compact lowercase badge: `lo` / `md` / `xh` / `max` / `ultra` / `auto` (`high` is the default and stays hidden). Dim for routine levels; `max` / `ultra` use the pressure color; `fast` shows in fast mode. |
83
-
| Context bar | Merged with model. Green / yellow / red by window pressure. On 1M models the bar also carries the premium input-pricing band: yellow past 200k tokens, red past 800k — the % alone looks calm (320k = 32%) while every request bills at the premium rate. A real 0% (e.g. right after `/compact` resets the window) renders a visibly empty bar `[░░░░░░0%]` — the snap to empty *is* the refresh signal; the bar hides only when no context data exists at all. |
83
+
| Context bar | Merged with model. Green / yellow / red by window pressure. On 1M models the bar also carries the premium input-pricing band: yellow past 200k tokens, red past 800k — the % alone looks calm (320k = 32%) while every request bills at the premium rate. A real 0% (e.g. right after `/compact` resets the window) renders a visibly empty bar `[░░░░░░0%]` — the snap to empty *is* the refresh signal; the bar hides only when no context data exists at all. Changes flash for ~60s in reverse video: `[█░░░░░30%]+9` while filling, `[░░░░░░3%]-27` right after a compaction. Cost flashes the same way, cents-precise: `$7.90+.37`. |
84
84
| User tier | Neutral white-weight (MAX bold, PRO normal, dim otherwise) — identity, never a status color. Truncated display name. |
85
85
| Quota | Integer percentages. The 5h badge always carries its reset time while a window is live — `5h[42%@14:30]` reads "42% used, resets at 14:30" — because on a 5h horizon the reset is the number you plan the current sitting around. Wall-clock, not a countdown, on purpose: Claude Code only re-renders the statusline on activity, so a relative "@1h38m" silently decays into a lie during idle gaps, while "@14:30" stays true in a frozen frame. (The 7d badge stays relative — `@5d` decays at day granularity, slower than any idle gap.) When a window's utilization climbs between renders, a reverse-video `+N` token appears right after the badge for ~60s: `5h[44%@14:32]+2` means "you just burned 2%". A drop (window reset) stays quiet — the fresh low number is its own signal. **7d is forecast, not leveled**: a learned per-weekday burn profile (EWMA over your own usage history) plus your recent 24h burn project whether the quota outlasts the window — your heavy Tuesday counts more than a generic average. The verdict is color alone; under pressure the badge shows explicit time remaining in the window: `7d[44%@5d]` red means "at your pace, dry days before the reset 5 days from now". Cold start (<14 days history) falls back to window-average pacing. Recovery color when reset is imminent. **Model-scoped weekly quota**: when the usage API carries a per-model weekly limit (`limits[]`, `kind=weekly_scoped`) for the model your session is running, it renders right after the model+context block — `fabl5[1m][12%] fb[67%]` on a Fable 5 session, `op[33%]` on Opus — because the quota is a property of the model you're running, not of the account-wide 5h/7d cluster. It's a weekly number (same reset as the 7d badge), scoped to one model. Other models' scoped quotas stay hidden: only the limit constraining *this* session is signal. Supersedes the legacy `seven_day_opus`/`seven_day_sonnet` fields, which the API now sends as null. |
86
86
| Extra usage | Monthly spend, limit, prepaid balance. `--extra auto` shows when quota runs out. |
@@ -107,9 +107,10 @@ red, matching its Claude Code TUI color) = model family; everything else is
107
107
| 5 themes, 9 bar styles | -- | Yes |
108
108
| Prompt cache break detection | -- | Yes |
109
109
| OAuth + macOS Keychain | -- | Yes |
110
-
|Quota bump flash (+N) | -- | Yes |
110
+
|Change flash on every refresh (`+.37` cost, `+9`/`-27` context, `+N` quota) | -- | Yes |
0 commit comments