Skip to content

[Bug]: Cursor usage history is always empty because Cursor's old usage-events endpoint now returns {} #28511

Open

Description

@askcatalystai

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Summary

Usage shows no Cursor history, even when cursor.com/dashboard lists recent requests for the same account. readCursorAccountUsage posts to https://cursor.com/api/dashboard/get-filtered-usage-events (packages/provider-cursor/src/server/accountUsage.ts:87 on main @ 5732bbee). Cursor still answers that with 200, but the body is now {} for any date range. T3 treats an empty body as zero events, so the scan succeeds with no records and no notice.

The Cursor dashboard no longer calls that endpoint. Its usage table reads GET /api/dashboard/v2/query-billing-items instead, and that returns the missing events with the same session cookie.

This is separate from #15906 (Usage reads the host CLI login rather than the account each Cursor instance bills). Here the CLI login and the T3 sign-in are the same account, and the history is still empty.

Steps to reproduce

  1. Log in with the Cursor CLI on the server (cursor-agent login) and run a few Cursor turns in T3.
  2. Confirm the requests appear at cursor.com/dashboard → Usage.
  3. Open Usage in T3. Cursor has no history.
  4. With the CLI token from ~/.config/cursor/auth.json and the cookie T3 builds (WorkosCursorSessionToken=<userId>::<accessToken>):
    • POST /api/dashboard/get-filtered-usage-events with {"page":1,"pageSize":5,"startDate":"<ms>","endDate":"<ms>"} returns 200 {} for 30 or 90 days. Adding teamId: 0 or sending numeric dates also returns {}, and get-aggregated-usage-events returns only {"startDate":"…"}.
    • GET /api/dashboard/v2/query-billing-items?scope=user&startTime=<ISO>&endTime=<ISO>&pageSize=3 returns the events.

A bad cookie gets a 307 redirect from both endpoints, so the {} is not an auth failure.

Expected behavior

Usage shows the Cursor requests that cursor.com/dashboard shows, or a notice when the history cannot be read.

Actual behavior

Cursor history is empty with no notice. usage-cursor-account-cache-v1.json stores the account with records: [] after each successful refresh.

Impact

Major degradation or frequent failure

Version or commit

Desktop 0.1.5 (Linux). The endpoint is unchanged on main @ 5732bbee.

Environment

Arch Linux, desktop app, local server, Cursor CLI file login (~/.config/cursor/auth.json), individual (non-team) Cursor account.

Logs or stack traces

Response from the new endpoint (identifiers removed):

{
  "data": [
    {
      "billingItemId": "13dba27d-…",
      "eventTime": "2026-11-01T03:43:46.022Z",
      "product": "cursor",
      "chargeCategory": "usage",
      "usageType": "included",
      "principal": { "type": "user", "id": "user_…" },
      "usage": {
        "cache-write-text-tokens": "0",
        "cached-prompt-text-tokens": "46400",
        "completion-text-tokens": "312",
        "prompt-text-tokens": "1263"
      },
      "pricing": { "currency": "USD", "contracted": "0.0000000000" },
      "displayExtras": { "model": "composer-2.5", "userEmail": "…", "displayLabel": "…" },
      "hasTokenMeters": true,
      "totalTokens": "47975"
    }
  ]
}

Notes for a fix, taken from the dashboard bundle:

  • The request is a GET with query parameters scope (user, or team with a team header), startTime and endTime as ISO strings, pageSize, and cursor for later pages. The next page comes from pagination.nextCursor, replacing page numbers and totalUsageEventsCount.
  • Token counts are strings under usage, with new keys (prompt-text-tokens, cached-prompt-text-tokens, cache-write-text-tokens, completion-text-tokens), replacing tokenUsage.inputTokens and the other numeric fields.
  • Cost is pricing.contracted as a decimal string in USD, replacing totalCents/chargedCents (see [Bug]: Cursor usage cost omits Cursor's token fee (uses totalCents, not chargedCents) #21408).
  • The model is displayExtras.model.
  • An empty {} from the old endpoint should probably surface as a notice and not count as "no usage", so a future API change does not fail silently again.

Activity

  1. KanujVerma commented on Nov 4, 2026

    @KanujVerma

    Note

    🤖 grok-4.7 responding on behalf of KanujVerma

    #29419 is already in v0.1.7 on this machine, and Cursor history is still missing current requests. main has the same readers.

    Limits work. GetCurrentPeriodUsage on 2026-11-04 showed Cursor Models at about 32%, Other Models at 0%, and Overall at about 30%. History does not. Desktop and local server are both 0.1.7 on macOS 27 arm64. Cursor is signed in through T3, and Keychain usage is enabled. The Keychain cookie cache and the API-key GetFilteredUsageEvents cache are the same account. A read at 2026-11-04T17:42Z stored 795 events. The newest event is 2026-11-03T19:10Z. There are no November 4 events, and the past 24 hours has one event.

    packages/provider-cursor/src/server/accountUsage.ts still posts cookie logins to https://cursor.com/api/dashboard/get-filtered-usage-events and API-key sessions to DashboardService/GetFilteredUsageEvents. Rows with null tokenUsage are skipped even when the event has a model and a cost. Nothing in v0.1.7...main changes this file.

    The dashboard read that still returns those requests is GET /api/dashboard/v2/query-billing-items. The API-key path needs the equivalent; GetFilteredUsageEvents is returning a set that stops on November 3.

  2. Bartek532 commented on Nov 10, 2026

    @Bartek532

    Same here, any updates?

  3. cms19859230182-lang commented on Nov 22, 2026

    @cms19859230182-lang

    Still happening on Desktop 0.1.11 (macOS) — 2026-11-23

    Same pattern as the Nov 4 comment here: Limits work, history does not include current usage.

    Environment

    • T3 Code (Beta) desktop 0.1.11 (app build date 2026-11-22)
    • macOS, local server
    • Cursor via Settings → Providers → Cursor → browser sign-in (authenticated / ready)
    • Same Usage page shows Antigravity + Pi costs normally

    What we see

    • Usage → Limits: Cursor Models / Overall ~57% used this period (GetCurrentPeriodUsage succeeds).
    • Usage → Cost / Tokens (30 days): no Cursor line at all (only Antigravity / Pi / OpenCode).
    • Re-signed in with Cursor in T3 and refreshed Usage: no change for current history.

    Local evidence

    ~/.t3/userdata/usage-cursor-account-cache-v2.json after re-login:

    • Full re-read succeeded: 51 pages, ~50,949 events → 49,597 records
    • Newest stored event is still 2026-10-14 (nothing from mid-Oct → today)
    • Account fingerprint changed on re-login, but the newest timestamp did not move forward

    From server.trace.ndjson around refresh:

    • POST …/DashboardService/GetFilteredUsageEvents → 200
    • Some incremental CursorAccountUsage.readScope spans report cursor.usage.events: 0 / records: 0
    • A full read still only materializes history ending on 2026-10-14

    So for API-key / T3 browser sign-in, GetFilteredUsageEvents appears to return a truncated set (history stops ~5+ weeks ago) while the period usage / Limits RPC stays current — matching this issue’s “old endpoint / missing current dashboard rows” diagnosis, and the note that the dashboard’s query-billing-items path still has the live requests.

    Happy to pull more logs if useful. Related fix PR #28526 looks closed without merge; we’re still on the old reader path in 0.1.11.

  4. ZachZimm commented on Nov 22, 2026

    @ZachZimm

    🤖 Claude (Opus 5.5 High), posting on behalf of @ZachZimm

    Summary: This still happens on Desktop 0.1.11 (Linux). Past Cursor usage shows up in T3, but current usage doesn't, even though the usage limits are current.

    What I see

    • Plan: individual Premium, with included usage that resets weekly. Signed in through T3's browser sign-in. Using grok-4.7 models.
    • Usage → Limits correctly shows 100% used this week.
    • Usage → Cost / Tokens (90 days) shows Cursor history through Sep 27, then nothing.
    • Cursor's dashboard billing history agrees there was no usage from Sep 28 to Nov 20. But it shows 1,322 billing items on Nov 21–22, and none of those appear in T3. So for this account the old endpoint was still returning data in late September, and it fails for usage from this week.

    What I found (in addition to what #34828 already reports)

    1. The dashboard endpoint has the missing data, but only with a CLI login. With the Cursor CLI's login token (~/.config/cursor/auth.json), query-billing-items returns all 1,322 items for Nov 21–22. Things to know before building on it:

      • It rejects date ranges longer than 31 days, so longer histories have to be read in chunks.
      • It sometimes returns 500 errors (it did for some of my August windows), so reads need retries.
      • It's much more granular than the old events. Sep 27 has 3,096 billing items, but only 31 events in T3's history for that day. Item counts can't be compared to the old event counts.
      • Usage covered by the plan (usageType: "included") has a price of "0.0000000000". The cost would have to be estimated from token counts. Some items have usageType: "credits" instead.
      • The names of the token fields aren't consistent. Some items use "Prompt text tokens", "Cached prompt text tokens" and "Completion text tokens" instead of the prompt-text-tokens style shown earlier in this issue.
    2. One endpoint accepts the API-key token, but it can't replace the history. DashboardService/GetUserAnalytics works with the token T3 uses. It only returns request counts per day and per model, with no tokens or cost.

    3. Token usage is saved locally for Cursor turns run through T3. The Cursor SDK keeps a local database at ~/.cursor/projects/<workspace>/sdk-agent-store/<hash>/index.db. In the runs table, the usage_json column records input, output, cache-read, cache-write and reasoning tokens for each run. 52 of the 57 runs since Nov 21 have this data. Reading it doesn't need any Cursor login, so it fits the API-key-only design. The limitation is that it only covers Cursor usage that went through T3, not usage from Cursor's own editor or CLI.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions