DurinDoor
Providers

Cursor

Import a Cursor IDE session, select a model, and recover an expired connection.

The Cursor provider (cursor, alias cu) lets DurinDoor send requests to Cursor's own chat backend with the session from your Cursor IDE. It is the opposite direction from the Cursor integration, which points the Cursor editor at DurinDoor.

There is no browser login. You import the access token and machine id the IDE already stores.

Connect

Open Providers, then Cursor IDE, then Connect. The Connect Cursor IDE modal runs auto-detect as soon as it opens.

Auto-detect

Auto-detect reads Cursor's local state.vscdb on the machine where DurinDoor runs. It only works when DurinDoor and a signed-in Cursor IDE share a host and user. It fills the form; you still confirm the import.

OSPaths checked, each followed by /User/globalStorage/state.vscdb
macOS~/Library/Application Support/Cursor, and the Cursor - Insiders variant
Windows%APPDATA%\Cursor, the Insiders variant, %LOCALAPPDATA%\Cursor, %LOCALAPPDATA%\Programs\Cursor
Linux~/.config/Cursor, ~/.config/cursor

It reads cursorAuth/accessToken (or cursorAuth/token) for the token, storage.serviceMachineId (or storage.machineId, telemetry.machineId) for the machine id, and cursorAuth/cachedEmail for the label.

Manual import

If DurinDoor runs somewhere else, copy those two values out of the IDE's state.vscdb yourself and paste them into the modal. The access token must be at least 50 characters. The machine id must look like a UUID. DurinDoor only checks the format; it does not call Cursor before saving.

The HTTP route is POST /api/oauth/cursor/import with accessToken, machineId, and optional cachedEmail.

No refresh

DurinDoor has no supported Cursor sign-in or refresh contract for this connection. The imported connection is saved with no refresh token and an estimated expiry 24 hours out; that estimate does not verify the session. When requests start failing with auth errors, sign in to the IDE again and repeat the import. Signing out of the IDE usually ends the imported session too.

Choose and verify a model

Send cu/<model> from GET /v1/models. cu/default selects Cursor Auto. GET /v1/models and the dashboard model list show the account's live Cursor catalog (GetUsableModels); when the live fetch fails, or a proxy applies to the connection, they fall back to the static catalog. Proxy-bound lookups do not use a previously cached direct catalog or prevent a later direct lookup. The imported machine ID is required for every request; a connection without it fails before dispatch.

Send a short prompt and find the account on Usage. Import validates token and machine-ID format, not a live Cursor request. A 401 after import can mean the session expired. Reimport after signing in to the IDE again.

AgentService transport

Requests with only text, MCP tool schemas, tool calls and tool results go to Cursor's AgentService (agent.api5.cursor.sh, agent.v1.AgentService/Run) over Node's built-in http2. Other request shapes (for example image parts) keep using the legacy ChatService path. Set CURSOR_AGENT_SERVICE=off to force every request onto the legacy path.

  • cu/default and cu/auto resolve to the account's default agent model from the live GetUsableModels catalog; if the catalog cannot be read, the id is sent unchanged.
  • reasoning_effort (or reasoning.effort) is forwarded as a model parameter. minimal maps to low and ultra to max; none sends nothing.
  • A turn that ends with no output is returned as an error, never as an empty success. For histories of 80 or more messages, one tail-only retry is attempted. Tune with CURSOR_TAIL_ONLY_THRESHOLD, CURSOR_EMPTY_TURN_MAX_RETRIES (capped at 1) and CURSOR_EMPTY_TURN_RETRY_DELAY_MS.
  • Editor-only tool requests from Cursor (shell, read, write) are rejected so the model can continue; DurinDoor does not run them.
  • Proxies: the HTTP/2 stream cannot go through a proxy. When any proxy applies to the connection (connection proxy, pool, strict mode, relay, or HTTPS_PROXY-style environment variables), requests use the legacy ChatService path, which honors the proxy. DurinDoor never connects to AgentService directly while a proxy applies. The auto, composer and thinking models only run on AgentService, so they need a direct connection (no proxy).

Image input

The current Cursor protobuf transport supports text and tool history, not images. Cursor models (cursor / cu) advertise vision: false, even when the underlying model family supports vision elsewhere.

Custom-model capability overrides cannot enable Cursor vision. The published model list, combo member capabilities, and request routing keep vision: false after operator overrides; other capability overrides and other providers retain their existing precedence.

Image input returns HTTP 400 with invalid_request_error before Cursor dispatch, for both streaming and non-streaming requests. This includes typed image blocks, image attachments, inline image data URLs in message strings, and images inside tool-result block arrays. Same-format Cursor requests are checked too; stripping images or enabling compression does not bypass validation. Ordinary tool JSON and text references to image filenames are not image input.

Remove the image or select a vision-capable provider. Explicit rejection is not image support.

Quota

The Quota Tracker reads Cursor's dashboard endpoints and shows Included spend, Auto mode, API usage, On-demand for individual and team pool, and per-model rows. Those come from Cursor's dashboard JSON, not from the chat protocol.

On this page

Edit on GitHub