mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 07:22:44 +00:00
* fix: resilient usage display under API rate limiting The Anthropic usage API rate-limits to ~1 call per 5 minutes. With the previous 60s cache TTL, 4 out of 5 API calls returned 429, causing the HUD to permanently display "(429)" instead of actual usage data. Three-layer fix: - Increase cache TTL from 60s to 5 minutes to match rate limit window - Preserve lastGoodData in cache across rate-limited periods so the HUD always shows the best available data instead of errors - Exponential backoff (60s→120s→240s→5min cap) with Retry-After header support for consecutive 429 responses Also show "syncing..." instead of raw HTTP status on first-run rate limit. * Update usage-api.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: harden 429 cache fallback behavior * test: stabilize usage cache suite after rebase --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>