Skip to content

Cursor rejects newly added models in projects that already ran a Cursor thread until T3 restarts #39240

Closed

Description

@dj-40AU

What happened

A newly available Cursor model (gemini-4-neon) works in a new scratch thread. In a project where a Cursor thread already ran earlier in the same server process, every attempt fails with: "Cursor cannot run the model "gemini-4-neon". Cursor only runs models from your Cursor account..."

Diagnosis

@cursor/sdk saves one runtime per workspace folder (module-level map keyed by workspace and state root). Each runtime saves the account's model list in localModelListCache with no expiry. resolveLocalModelSelection then rejects any model missing from that saved list with a ConfigurationError ("Cannot use this model: ..."). The T3 Cursor adapter (classifyCursorModelRejection, packages/provider-cursor/src/server/adapter.ts) rewrites it as CursorModelUnavailableError. Affects SDK 1.2.0 (v0.1.9) and 1.3.1 (main).

Possible fixes: re-check the model list once after a rejection; build the SDK runtime fresh when the model list may have changed; or pass a fresh list through the SDK's model-list override env var. The error text should also stop telling the user the model isn't on their account.

Steps to reproduce

  1. Start T3 Code and run a Cursor thread in project A.
  2. Have Cursor add a new model to the account while T3 keeps running. Confirm it shows in cursor-agent --list-models.
  3. Start a new thread in project A with the new model. It fails as described.
  4. Start a thread with the same model in a new scratch folder. It works.
  5. Restart T3. Project A now works.

Version

T3 Code Desktop 0.1.9 (local server 0.1.9); @cursor/sdk 1.2.0

Environment

macOS 26 (darwin 25.6.0, arm64), desktop app with built-in local server, Cursor provider through the SDK, cursor-agent CLI 2026.10.01

Evidence

SDK error: `Cannot use this model: gemini-4-neon. Available models: ... gemini-4-carbon, gemini-4-hydrogen, gemini-4-argon, ...` (no neon).
Provider event log shows identical `agent.open` options in the passing and failing threads; only the working folder differs.
Server started Nov 16; the project's earlier Cursor threads ran Nov 16-18; gemini-4-neon first appears in logs Nov 19.

Related issues

#35693 and #38609 (same stale-cache pattern in other providers)

Fix applied or workaround

Restart T3 Code, or run the thread in a new worktree.

Filed by

Produced by Claude Opus 5.5 in T3 Code (Cursor harness) through t3 triage.

Activity

  1. added
    via-triage
    on Nov 19, 2026
  2. Mr-Neutr0n commented on Nov 19, 2026

    @Mr-Neutr0n
    Contributor

    Hit the exact same issue on Desktop 0.1.10 (@cursor/sdk 1.3.1) with gemini-4-neon.

    Two threads launched seconds apart with identical model: "gemini-4-neon" and reasoning_effort: "high" options:

    • Existing project workspace (which had run Cursor threads before Neon rolled out): failed on Agent.create with Cannot use this model: gemini-4-neon (Available models: ... gemini-4-carbon, gemini-4-hydrogen, gemini-4-argon ...).
    • Fresh scratch folder (new workspace ref): succeeded immediately.

    Also checked @cursor/[email protected] (latest on npm): its per-workspace platform singleton still holds localModelListCache with no expiry or invalidation on model rejection, so an SDK bump alone won't clear this.

    Working on a fix PR for provider-cursor.

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

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions