CommandCodeAI / CommandCodeAI/command-code

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

Open
#546 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the /internal/usage endpoint handler and tracing how it reads usage records; compare that path with the balance refresh path, which still works. Reproduce the stale response with the curl request and verify completion when new API calls appear in the endpoint and dashboard within minutes.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.