Repository navigation
Description
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
This reproduces deterministically offline with no Cursor account using a local HTTP/1.1 ConnectRPC stub backend:
- Start a local HTTP/1.1 server on
http://127.0.0.1:13998that answers:GET /v1/me->{"apiKeyName":"stub","createdAt":"2026-01-01T00:00:00.000Z","userEmail":"stub@example.invalid"}GET /v1/models->{"items":[{"id":"default","displayName":"Auto"}]}POST /auth/exchange_user_api_key->{"accessToken":"stub-access-token"}POST /agent.v1.AgentService/RunSSE-> HTTP 200 (content-type: application/connect+proto) with a Connect EndStreamResponse (0x02frame) whose JSON error hascode: "resource_exhausted"anddetails: [{ type: "aiserver.v1.ErrorDetails", value: <base64 protobuf for error = PRO_USER_USAGE_LIMIT (10), title = "Weekly usage limit reached.", detail = "It resets in 3 days. Buy credits to keep going now."> }].
- Start T3 Code with
CURSOR_BACKEND_URL=http://127.0.0.1:13998 CURSOR_API_KEY=test-cursor-key. - Enable the
cursorprovider and set text generation tocursor/default. - Start a Cursor thread with any prompt (for example,
Say hello) and open it in the web app. - Open the thread actions menu and click Regenerate title.
Expected behavior
Per docs/internals/03_providers.md ("Classify quota/rate-limit errors as usage_limit (with reset time when available) rather than generic failures"), PR #26234, and PR #29748:
- The failed Cursor turn should be classified as
usage_limit, showing theUsage limit reachedbanner and the sidebarLimitedbadge. - Text generation (thread title, branch name, commit message, PR text) should report
"Cursor usage limit reached. Try again later or choose another text-generation provider.".
Actual behavior
- The Cursor turn is classified as
provider_error, displaying a red Provider error in the conversation timeline with noLimitedbadge or usage-limit recovery banner. - Clicking Regenerate title shows a toast with the generic fallback
"Cursor SDK request finished with an error.".
Root cause: In @cursor/sdk@1.5.2, AgentClient wraps the ConnectError carrying aiserver.v1.ErrorDetails (PRO_USER_USAGE_LIMIT) into an internal ActionRequiredError (cause: ConnectError, no .code), and LocalAgent's toRunError/wrapError only inspects instanceof CursorSdkError and instanceof ConnectError (not .cause), so RunResult.error arrives with { message: "Weekly usage limit reached. It resets in 3 days. Buy credits to keep going now." } and code: undefined — which isCursorUsageLimitError() in packages/provider-cursor/src/server/CursorAgentSdk.ts does not recognize.
Impact
Major degradation or frequent failure
Version or commit
v0.1.14-nightly.20261129.5452 / main @ df2cbe3961
Environment
macOS (arm64), Node v26.13.1, Chromium 156, @cursor/sdk@1.5.2, Cursor provider (default model). Reproduces identically on Linux with the local ConnectRPC stub above.
Logs or stack traces
RunResult from @cursor/sdk@1.5.2:
{
"status": "error",
"error": {
"message": "Weekly usage limit reached. It resets in 3 days. Buy credits to keep going now."
}
}
// result.error.code === undefined
// isCursorUsageLimitError(result.error) === false
Screenshots, recordings, or supporting files
Workaround
Switch the text-generation provider in Settings to another provider and manually retry Cursor turns after the limit resets or credits are purchased.

Activity