Skip to content

[Bug]: Cursor token usage stays empty on large accounts because the first account-history read never fits the 10s/60s timeouts #38550

Closed

Description

@FlynnYYYY

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

Steps to reproduce

  1. Sign in to Cursor with browser sign-in on an account that has a lot of usage history (personal scope + one team).
  2. Open Usage.
  3. Cursor shows up under Limits, but there are no Cursor tokens/cost in the usage history. Reopening Usage later retries and fails the same way.

Expected behavior

Cursor token usage appears, even if the first backfill of the retention window is slow. Pages that were already fetched should be kept (or the window fetched in chunks) so a slow account eventually converges, and the UI should say that the Cursor history read timed out.

Actual behavior

Limits work: readCursorUsageLimits (GetCurrentPeriodUsage) succeeded 12/12 times in about 2s each.

Token history never loads: readCursorAccountUsage (GetFilteredUsageEvents, 1000 events per page) failed on all 3 attempts in one session:

  • attempt 1: a readPage hit the 10s per-page timeout after 33s total
  • attempt 2: hit the 60s overall timeout
  • attempt 3: a readPage hit the 10s per-page timeout after 14s total

Across the 3 attempts 170 page requests were started: 144 succeeded, 2 failed on the 10s timeout, 24 were interrupted. Individual pages often take 7-14s here.

Because any single failed page makes the whole read return records: [] with an error, refreshAccount stores only a failure, and usage-cursor-account-cache-v2.json is never written. Every retry starts again from the full retention window, so the account can never catch up.

Impact

Major degradation or frequent failure

Version or commit

0.1.10 (desktop, stable)

Environment

macOS 27.0.1, Apple Silicon, T3 Code (Beta) desktop 0.1.10, Cursor provider with browser sign-in, account in one team

Logs or stack traces

# server.trace.ndjson, span summary (local time)
17:52:37 readCursorAccountUsage            35060 ms
17:52:39 CursorAccountUsage.readScope      Failure      33202 ms  (CursorAccountUsageInvalidError)
17:52:39 CursorAccountUsage.readScope      Interrupted  33205 ms
18:21:00 readCursorAccountUsage            60005 ms
18:21:02 CursorAccountUsage.readScope      Interrupted  58165 ms
18:21:02 CursorAccountUsage.readScope      Interrupted  58168 ms
18:23:04 readCursorAccountUsage            13879 ms
18:23:04 CursorAccountUsage.readScope      Failure      13878 ms  (CursorAccountUsageInvalidError)
18:23:04 CursorAccountUsage.readScope      Interrupted  13878 ms

CursorAccountUsage.readPage: 144 Success, 2 Failure (durations 10000 ms and 15243 ms), 24 Interrupted
readCursorUsageLimits: 12 Success, 1.2-4.3 s each

Screenshots, recordings, or supporting files

No response

Workaround

None found. The two timeouts are not configurable. Usage is visible on the cursor.com dashboard.

Activity

  1. added
    bug
    needs-triage
    on Nov 18, 2026
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

    bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions