Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Cursor usage limits appear once per linked environment for the same Cursor account #45237

Opentombell(GitHub profile, opens in a new tab) opened this issue 0 comments
tombell(GitHub profile, opens in a new tab)commented

Before submitting

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

Area

Not sure

Steps to reproduce

  1. On two machines, sign in to the same Cursor account in T3 Code (each machine gets its own Cursor SDK API key via browser sign-in, or uses a CURSOR_API_KEY where GET https://api.cursor.com/v1/me omits userEmail).
  2. Link both machines as environments in T3 Code.
  3. Open Usage → Limits with both environments selected (All environments).

Expected behavior

One Cursor usage bar for the shared Cursor account (matching how Codex and Claude collapse across linked environments), with the pooled percentage and ↻ reset forecast counting the subscription once.

Actual behavior

Actual behavior

Each linked environment renders its own Cursor bar side by side with the same percentage and reset time (e.g. two Cursor 85% · 4d 21h bars). Because T3 Code treats them as two separate accounts, the ↻ refill delta on the left is also halved (e.g. +8% in 4d 21h instead of +15%).

Impact

Cosmetic issue

Version or commit

T3 Code 0.1.14-nightly.20261128.5413

Environment

  • Local: macOS (ARM64), T3 Code Nightly 0.1.14-nightly.20261128.5413
  • Linked environment: macOS (ARM64), T3 Code Nightly 0.1.14-nightly.20261128.5413
  • Provider: Cursor (same Cursor account signed in on both machines via browser sign-in)

Logs or stack traces

N/A

Screenshots, recordings, or supporting files

N/A

Root cause

collectLimitAccounts in packages/shared/src/usageLimits.ts deduplicates native providers across environments using provider.auth.email or usageLimits.credentialFingerprint, falling back to ${environmentId}:${provider.instanceId} when neither is present:

  • packages/provider-cursor/src/server/status.ts (cursorSdkAuth) only sets auth.email if GET https://api.cursor.com/v1/me returns the optional userEmail field. When /v1/me omits userEmail, auth.email is undefined.
  • packages/provider-cursor/src/server/usageLimits.ts (readCursorUsageLimits) exchanges the API key for an access token (exchangeCursorApiKey) and calls GetCurrentPeriodUsage, but never attaches a credentialFingerprint to the returned UsageLimits.
  • Meanwhile, packages/provider-cursor/src/server/accountUsage.ts (readSession) already derives a stable per-account hash (sha256(jwt.sub)) from that exact same exchanged access token — and confirms both machines resolve to the same accountKey in usage-cursor-account-cache-v2.json despite having different API keys.

Suggested fix

In packages/provider-cursor/src/server/usageLimits.ts (readCursorUsageLimits), decode sub from the exchanged JWT access token (the same way accountUsage.ts does) and set credentialFingerprint (e.g. account:<sha256(sub)>) on the returned UsageLimits.

Workaround

Filter Usage → Limits to a single environment instead of All environments.

  • #44416 / #44425 (same cross-environment deduplication gap for OpenCode Go, fixed by emitting credentialFingerprint)
  • #23054 (same deduplication gap for hub-routed Codex)

Sign in to join this conversation.