Skip to content

[Bug]: Wrong Claude weekly info #89

Closed

Description

@TMS-Namespace

Plugin version

2.2.0

Area

DankBar widget

Environment

Dux

Steps to reproduce

I think this happens only closer to the end of the weekly period.

P.S:
I forcefully refreshed statistics on the plugin of course before reporting.

Expected behavior

To show the correct weekly usage.

Actual behavior

This is what the plugin shows:
Image
But official Claude extension on VS Code shows:
Image
Image

Local checks

Activity

  1. added
    bug
    on Oct 30, 2026
  2. bernardopg commented on Oct 30, 2026

    @bernardopg
    Owner

    Thanks a lot for the report, @TMS-Namespace, and for the screenshots: the matching reset time next to the different percentage is what pointed straight at the cause.

    What happened. The plugin reads Claude's limits from Anthropic's usage endpoint, which is rate-limited per account and often answers HTTP 429 (I can reproduce that on my own account right now). When a request fails like that, the adapter deliberately falls back to the last good snapshot instead of turning the card into an error. The bug was that it stamped that old snapshot with the current time. So the card kept saying Live, the stale indicator never appeared, and the weekly value stayed at the 79% from the last successful fetch while Claude Code (which gets its numbers from its own API responses) already showed 89%. The countdown still looked right because the reset time is an absolute date. A forced refresh hit the same 429 and got the same fallback.

    The fix (#90):

    • A fallback snapshot keeps the time it was actually fetched, so the card shows the Stale badge and the real Updated time instead of looking current.
    • If a window's reset has passed since that snapshot, it reads 0% instead of carrying the pre-reset percentage into the new week.

    Once the endpoint answers again, the next refresh shows the live numbers as before. If you see Stale on the Claude card, it means the endpoint is still rate-limiting you, and the troubleshooting doc now explains how to check that. The fix will ship in the next patch release; I'll update this issue when it's out.

  3. bernardopg commented on Oct 30, 2026

    @bernardopg
    Owner

    The fix is out in v2.2.2. Update the plugin and reload it (no full restart needed, only the shell adapters changed).

    From now on, whenever Anthropic's usage endpoint rate-limits the account, the Claude card shows Stale with the time the numbers were really fetched, instead of presenting old percentages as Live. Once a request succeeds again, the card goes back to live values.

    Thanks again for taking the time to report it with such clear screenshots, @TMS-Namespace. If you still see a mismatch on 2.2.2 while the card says Live, please reopen this issue with the output of ./providers/get-claude-usage | grep -E '^(SEVEN_DAY_UTIL|USAGE_UPDATED_AT)=' from the plugin directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions