Skip to content

Add Cursor (IDE/agent) as a client — localMode-ready integration #974

Closed as not planned

Description

@Wibias

Area

Multiple areas (Proxy and routing, Catalog / models, CLI, Documentation)

What are you trying to accomplish?

Add Cursor (IDE/agent) as a client: users should be able to pick
opencodex-routed models (Claude, Gemini, Grok, DeepSeek, Ollama, …) inside
Cursor's model picker, the same way Codex CLI/App users get the opencodex
catalog today. Research and a live spike are complete (2026-08-03/04, Cursor
3.14.7 stable, Windows). This issue is the public tracking point for the
readiness work and the eventual implementation; the solution PR will be
linked here when it lands.

What prevents this today?

  • Cursor stable (3.14.7) has no official custom-provider endpoint UI. The BYOK
    surfaces that exist (Settings → Models → API keys) are fixed-endpoint only
    (OpenAI / Anthropic / Google / Azure / Bedrock).
  • The mechanism Cursor is building for custom endpoints — the "local agent" /
    private-inference runtime (storage keys openAIBaseUrl, useOpenAIKey;
    env CURSOR_LOCAL_AGENT_API_KEY, CURSOR_LOCAL_AGENT_BASE_URL,
    ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL) — is gated behind a
    compile-time build flag localMode: false in stable builds (no
    product.json override).
  • Even with the base URL configured (verified by direct storage injection),
    Cursor routes custom-provider traffic through its own backend, which
    refuses private-network targets ("Access to private networks is
    forbidden", request-id error; the string is absent from the app bundles →
    server-side guard). No allowlist setting exists; enterprise "Private
    Connectivity" is Git-provider-only (PrivateLink / Cloudflare Tunnel).
  • Tunnel workarounds (localhost.run / Pinggy over the built-in SSH client,
    cloudflared) work but do not productize: not every user has ssh or a
    tunnel binary, and a per-user public tunnel is a security regression for
    opencodex (public exposure, API key transiting Cursor's servers,
    per-session URL churn).

What should OpenCodex do?

  • Detect localMode-capable Cursor builds (version + build-flag probe) and
    offer the integration only when it can work without a tunnel.
  • Provide a ocx cursor / Integrations-surface management flow
    (status / apply / disable, snapshot + undo + drift refusal) that writes
    Cursor's reactive storage blob
    (…reactiveStorageServiceImpl.persistentStorage.applicationUser:
    userAddedModels as model-name strings, openAIBaseUrl, useOpenAIKey),
    with row-level backups — the state.vscdb is ~19 GiB, so whole-file
    backups are impractical.
  • Serve the existing /v1/models catalog (OpenAI list shape; 92 routed
    models today) as Cursor's model list; keep loopback keyless so Cursor's key
    field holds a placeholder and no real credential enters Cursor's secret
    storage.
  • Document setup and honest limitations; keep a user-supplied relay URL as a
    documented power-user escape hatch, never automatic.

Example usage or interface

ocx cursor status     # detects Cursor install, localMode capability, current routing state
ocx cursor apply      # writes openAIBaseUrl=http://127.0.0.1:10100/v1 + catalog model ids
                      # into Cursor's reactive storage, with backup/undo
ocx cursor disable    # removes only the entries opencodex wrote

UI: a Cursor card in the Integrations overview. After apply, Cursor's model
picker lists catalog entries such as anthropic/claude-fable-5 and
xai/grok-4.5, and chat/agent turns route through the local proxy.

Alternatives or workarounds

Additional context

  • Spike evidence (Cursor 3.14.7 stable, Windows): injecting
    userAddedModels + openAIBaseUrl into the reactive blob makes models
    appear in Cursor's picker, and Cursor does attempt to route chat to the
    configured base URL; the attempt is blocked by Cursor's cloud
    private-network policy. opencodex loopback admission is keyless, and
    GET /v1/models already returns the OpenAI list shape with routed ids.
  • Storage contract: ItemTable values are plain text (booleans true/false,
    strings unquoted, complex values JSON); secret:// rows are encrypted
    (never read or written by the integration).
  • Cursor enterprise "Private Connectivity" is not applicable to model
    endpoints (Git-provider-only; requires Enterprise plan).
  • Re-run criteria: a Cursor build (stable or beta) with localMode enabled,
    or an official custom-provider endpoint feature. Spike steps and baselines
    are recorded in devlog plan unit 260803_cursor_client_integration
    (to be committed to this repository).

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. added
    enhancement
    upstream-tracking
    on Aug 4, 2026
  2. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: unknown.

  3. added
    catalog
    on Aug 4, 2026
  4. lidge-jun commented on Aug 4, 2026

    @lidge-jun
    Owner

    ok l have some reference to follow with

  5. olddonkey commented on Aug 4, 2026

    @olddonkey
    Contributor

    +1 for this support, this is exciting

  6. added
    roadmap
    on Aug 8, 2026
  7. Wibias commented on Aug 8, 2026

    @Wibias
    ContributorAuthor

    Status: blocked on Cursor exposing a usable local/custom-provider transport.

    The OpenCodex-side integration work is understood, but current stable Cursor builds still prevent the required local endpoint workflow without an unsafe/public tunnel workaround.

    Unblock when either:

    1. Cursor enables the localMode/private-inference path in a supported build; or
    2. Cursor ships an official custom-provider/base-URL integration that can target OpenCodex locally.

    Do not implement an automatic public-tunnel workaround as the default.

  8. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 38 / 80

    현재 dev에는 Cursor를 Codex/Claude Desktop과 같은 네이티브 클라이언트로 관리하는 코드가 없습니다. src/integrations의 cursor 식별자는 문서 포인터 변수이고, localMode, openAIBaseUrl, userAddedModels를 쓰는 Cursor 적용 경로는 검색되지 않습니다. 이슈가 적은 스파이크(Cursor 3.14.7, Windows)는 연구 결과이지 제품 통합이 아닙니다.

    이슈가 원하는 것은 Cursor 모델 피커에서 OpenCodex 라우트 모델을 고르는 것입니다. 안정 빌드는 커스텀 프로바이더 UI가 없고, localMode는 컴파일 플래그로 꺼져 있으며, base URL을 저장소에 넣어도 Cursor 백엔드가 사설망을 거부합니다. 공개 터널은 키를 Cursor 서버로 보내고 URL이 세션마다 바뀌므로 OpenCodex 보안 회귀입니다.

    네이티브 신뢰성과 위생이 점수를 낮춥니다. state.vscdb는 수 기가바이트라 통째 백업이 아니고 행 단위 스냅샷이 필요하고, 터널 없이 동작하지 않으면 통합을 제안하면 안 됩니다. Windows 스파이크가 있어도 업스트림 가드가 서버 쪽이면 클라이언트 패치로 풀리지 않습니다.

    Wibias 코멘트와 같이 차단 조건은 Cursor가 localMode/private-inference를 지원 빌드에 열거나, 공식 커스텀 프로바이더 수송을 주는 것입니다. 그 전에 ocx cursor apply를 만들면 깨진 통합을 설치하게 됩니다.

    해결방안은 능력 탐지(버전 + 빌드 플래그)만 준비하고, 수송이 열리기 전에는 apply를 거부하는 것입니다. 공개 터널을 제품 경로로 두지 않습니다. 패치는 추측하지 않으며, 현재 트리를 Cursor 클라이언트 통합으로 보지 않습니다.

    이 댓글은 grok-bot이 작성했습니다

  9. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 54 / 80 · 유지

    점수 정정임. 38 → 54. Cursor 피커에서 ocx 라우티드 모델을 고르게 하자는 트래킹.

    이 레포에서 Cursor 클라이언트를 직접 깔 필요 없음. 지금은 npm ocx-cursor (npx ocx-cursor init) 쓰자. 게이트웨이 + 카탈로그 싱크가 저쪽에 있음. 소스: hiddenest/opencodex-cursor-bridge.

    Cursor 공식 커스텀 엔드포인트 UI가 생길 때까지 1st-party 구현은 안 함. 이 이슈는 그 브릿지/업스트림 준비 트래킹으로 열어 둠.

    해결방안: npx ocx-cursor init --base-url <https-host>/v1. 앱 패치·턴널은 그 패키지 문서 따름. ocx 본체에 Cursor IDE 클라이언트를 새로 넣지 말 것.

    이 댓글은 grok-bot이 작성했습니다

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

    catalogenhancementroadmapupstream-tracking

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions