t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Cursor usage limits never show with browser sign-in (reported as "unsupported")

Open ethan-lipseys opened this issue 1 month ago • 1 comments

What happened

"I can't see my Cursor usage limits in T3 Code." Cursor is enabled and shows as authenticated (browser sign-in) in Settings → Providers, but Usage → Limits only shows Claude. On the stable channel, Cursor limits show up.

Diagnosis

Cursor usage limits are always reported as unsupported when the Cursor instance is signed in with T3's browser login (the Cursor SDK flow) rather than an explicit API key.

  • packages/provider-cursor/src/server/driver.ts (~L217–240): checkProvider reads auth.readApiKey. With browser sign-in, that returns the SDK-minted key from the instance credential store (auth.ts L76–93). The driver then passes it into the usage read as { ...processEnv, CURSOR_API_KEY: apiKey }.
  • packages/provider-cursor/src/server/usageLimits.ts L80–83: when CURSOR_AUTH_TOKEN is unset and CURSOR_API_KEY is set, readCursorUsageLimits returns makeUnavailableUsageLimits({ reason: "unsupported" }) with no message ("An explicit API key can name a different account from the stored login").
  • Net effect: browser sign-in always injects CURSOR_API_KEY, so the usage probe never runs, and the UI drops Cursor from the Limits view.

Stable (v0.0.45, apps/server/src/provider/Drivers/CursorDriver.ts ~L150) calls readCursorUsageLimits(effectiveConfig, processEnv, ...) with the unmodified env, so it falls through to the cursor-agent CLI login (%APPDATA%\Cursor\auth.json on Windows) and works.

The injection has been present since Cursor moved into packages/provider-cursor (#17349), and is unchanged on main as of 26fffe5.

Possible direction (not verified): when auth.usesApiKey is false, don't treat the SDK browser-login key as an "explicit" key in the usage read. Also note the browser login no longer guarantees a CLI auth.json exists, so the usage reader may need a token source tied to the instance's own sign-in.

Steps to reproduce

  1. Run the desktop app on a nightly build (seen on 0.0.46-nightly.20261015.3158).
  2. Settings → Providers → Cursor: enable it and sign in with the browser flow. Leave "Cursor API key" empty and set no CURSOR_API_KEY/CURSOR_AUTH_TOKEN variables.
  3. Open Usage → Limits. Cursor is missing; only other providers (e.g. Claude) are listed.
  4. Inspect the provider status cache ~/.t3/caches/cursor.json: usageLimits is {"windows":[],"unavailable":{"reason":"unsupported"}}.

Version

0.0.46-nightly.20261015.3158 (desktop app, local server; serverSelfUpdate: desktop-managed). Triage CLI was 0.0.45.

Environment

Windows 11 Pro 10.0.26200 x64, Node v26.8.2 (triage CLI), Claude CLI 2.1.300, Cursor via T3 browser sign-in (Cursor version not reported, version: null in status cache)

Evidence

# ~/.t3/caches/cursor.json (excerpt)
"status": "ready",
"auth": { "status": "authenticated", "type": "browser", "label": "Cursor account" },
"version": null,
"usageLimits": {
  "checkedAt": "2026-10-15T19:14:27.334Z",
  "windows": [],
  "unavailable": { "reason": "unsupported" }
}

# packages/provider-cursor/src/server/driver.ts @ v0.0.46-nightly.20261015.3158
readCursorUsageLimits(
  effectiveConfig,
  { ...processEnv, CURSOR_API_KEY: apiKey },   // apiKey = browser-login SDK key
  settings.cursorKeychainUsageEnabled,
)

# packages/provider-cursor/src/server/usageLimits.ts
// An explicit API key can name a different account from the stored login.
if (!token && environment.CURSOR_API_KEY?.trim()) {
  return makeUnavailableUsageLimits({ checkedAt, reason: "unsupported" });
}

Screenshots (Usage → Limits showing only Claude; Providers page showing Cursor authenticated) will be attached below.

Related issues

None found. Searched "cursor usage limits" and "cursor limits unsupported". Related PRs: #5921 (Cursor usage tracking), #17578 (usage moved into provider-cursor), #17349 (package move).

Fix applied or workaround

None applied. Workaround: the stable channel shows Cursor limits.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

ethan-lipseys avatar Oct 15 '26 19:10 ethan-lipseys

[!NOTE] Grok responding on behalf of Julius.

This is the same root cause as #19008: after T3 browser/SDK sign-in, the Cursor driver injects the instance key as CURSOR_API_KEY, and readCursorUsageLimits returns unsupported so Cursor drops off Usage → Limits. Closing this as a duplicate of that issue.

Open fix: #19578 (Fixes #19008). Related: #15906, earlier dup #16861.

juliusmarminge avatar Oct 15 '26 19:10 juliusmarminge