Skip to content

Dashboard usage records not updating — /internal/usage endpoint returns stale data #546

Description

@CATMIAOZHI

Describe the bug
The usage/billing history on the web dashboard (commandcode.ai) hasn't been updating. The /internal/usage API endpoint is returning stale data — the latest record is from July 2nd, even though new API calls have been made in the last 24+ hours.

Balance refresh still works fine, it's specifically the usage records endpoint that's stuck.

To Reproduce

  1. Make a new API call with command-code
  2. Go to commandcode.ai dashboard → usage history
  3. Latest API call not listed
  4. Or directly: curl 'https://api.commandcode.ai/internal/usage?limit=5' with valid session cookie — observe latest createdAt is stuck at July 2nd, no newer records appear

Expected behavior
Usage records should appear within minutes of each API call.

Additional context

  • Balance/credits refresh works normally
  • The API returns HTTP 200 with data, but the data itself is stale
  • This affects both the web dashboard and any third-party apps relying on this endpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions