Skip to content

[Bug]: Cursor data-policy action required is lost as bare failed_precondition: Error #4508

Closed

Description

@HeiTuz

Cursor data-policy action required is lost: ErrorDetails discarded and only failed_precondition: Error reaches clients

Client or integration

Originally observed in Codex App; independently reproduced with a minimal direct HTTP request and the installed Cursor transport. Native Cursor CLI provides the control.

Provider / version / endpoint

  • OpenCodex 2.52.0, verified both by ocx --version and the running proxy's /healthz.
  • macOS arm64; Codex CLI 0.154.0; native Cursor CLI 2026.09.02-c22c1a3.
  • POST /v1/responses → Cursor agent.v1.AgentService/Run at https://api2.cursor.sh.
  • Requested cursor/claude-fable-5-1, reasoning medium; observed wire model claude-fable-5-1-thinking-medium.
  • Reproduced September 13, 2026. Native Cursor and OpenCodex credentials have the same JWT subject, compared locally without disclosing either credential or subject.

Current behaviour

An account that has not acknowledged the Fable data-retention policy receives only:

stream disconnected before completion: Cursor invalid request: Cursor Connect error failed_precondition: Error

This conceals the action the user needs to take. The same exact wire model through native Cursor CLI reports:

ActionRequiredError: Review Data Policy You must acknowledge Claude Fable 5's data retention policy to use the model.

This is not merely an inference from the native CLI. A separate, isolated invocation of the installed OpenCodex transport captured the Connect end-stream error before its parser discarded the detail. The upstream error has code="failed_precondition", message="Error", and a detail of type aiserver.v1.ErrorDetails with both value (base64 protobuf) and debug representations. Relevant redacted debug fields:

{
  "error": "ERROR_MODEL_BLOCKED",
  "details": {
    "title": "Review Data Policy",
    "detail": "You must acknowledge Claude Fable 5's data retention policy to use the model.",
    "isRetryable": false,
    "showRequestId": false,
    "analyticsMetadata": { "actionRequired": "config" }
  },
  "isExpected": true
}

The server also supplies policy-view and consent-action buttons; they are omitted here. No consent was accepted and no policy or account setting was changed during diagnosis.

Minimal reproduction

Prerequisite: an authenticated Cursor account for which the Fable data-policy acknowledgement remains outstanding.

curl -N http://127.0.0.1:10100/v1/responses \
  -H 'Content-Type: application/json' \
  --data-binary '{"model":"cursor/claude-fable-5-1","input":"Reply with exactly CURSOR_PROBE_OK. Do not use tools.","reasoning":{"effort":"medium"},"stream":true}'

Native control, from an empty trusted scratch directory:

cursor-agent --print --mode ask --trust \
  --model claude-fable-5-1-thinking-medium \
  --output-format json \
  'Reply with exactly CURSOR_PROBE_OK. Do not use tools.'

Paired results using the same account and synthetic prompt:

Route Model / effort Result
OpenCodex /v1/responses Fable 5.1 / medium response.failed, bare failed_precondition, 1.53 seconds
OpenCodex /v1/responses Fable 5.1 / high Same failure, 1.51 seconds
OpenCodex /v1/responses cursor/auto-intelligence response.completed, exact CURSOR_PROBE_OK, 3.19 seconds
Native Cursor CLI Exact Fable 5.1 thinking-medium wire ID ActionRequiredError with data-policy acknowledgement instructions

The minimal failing proxy request had one raw message, zero tools, one root blob, 58 root bytes, and no checkpoint. It received 13 frames, including interactionUpdate:stepCompleted, and failed with zero output tokens. This rules out a large tool catalog or accumulated conversation history as necessary triggers for this reproduction. stepCompleted preceding the error does not establish schema drift.

HTTP status is 200 because this is streaming; the terminal SSE event is response.failed, with error.type and error.code both invalid_request_error. OpenCodex's usage record classifies the failure as 400. The minimal request made one upstream attempt and did not retry.

Expected behaviour

Preserve a bounded, sanitized actionable explanation from the structured Cursor error: the model is blocked pending the user's review of its data-retention policy. Keep the failure non-retryable and direct the user to Cursor's own policy-review flow. Do not silently consent, change plans, or substitute a model.

Implementation evidence / suggested scope

parseConnectEndStreamError reads only error.code and error.message; error.details is ignored. The installed 2.52.0 source has the same implementation.

classifyCursorError already maps failed_precondition to a non-retryable invalid request. This report is not requesting a blanket status/retry change. Its plan-gating comment should not be treated as an exhaustive diagnosis: the captured rejection is a policy-consent gate.

The fix should decode the recognized aiserver.v1.ErrorDetails protobuf value, whitelist and sanitize user-facing fields, and preserve actionable details through the adapter and SSE error path. Unknown or malformed details should retain the current safe fallback. The Connect specification says clients must not depend on the optional debug representation, so copying debug into errors alone would not be a robust fix. Regression coverage should include the policy gate, unknown/malformed details, redaction, and unchanged non-retryable behaviour.

Related evidence and limits

  • Connect error detail specification.
  • OpenCodex Cursor adapter documentation.
  • pi-cursor #29 reports the same Fable error signature but suspects protocol drift. This report provides direct policy-gate evidence for this account, not proof that every occurrence has the same cause.
  • OpenCodex #2769 addressed classified error status propagation; this is the separate loss of structured upstream action-required details.
  • Historical local usage records show one Fable conversation with 13 successful requests followed by six failures with this signature. The triggering policy-state transition and the runtime version at that earlier moment were not established; the current 2.52.0 minimal reproduction above is the submission's primary evidence.
  • Post-consent success was intentionally not tested. The evidence proves the current gate and lost explanation, not when it first appeared.

Checks

  • Searched existing provider issues and PRs for failed_precondition, ActionRequired, Review Data Policy, and Cursor consent handling.
  • Requests, responses, and diagnostic excerpts are redacted; no credentials, JWT subjects, account identifiers, original prompts, or original tool results are included.
  • Expected behaviour is based on a captured upstream structured error, a native-client control, and the Connect specification.

Activity

  1. added
    bug
    on Sep 13, 2026
  2. lidge-jun commented on Sep 13, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 74 / 80

    설명
    이 이슈는 Cursor Fable 계열 모델에서 데이터 보관 정책에 동의하지 않은 계정이 받을 “해야 할 일” 안내가, OpenCodex를 거치면 사라지는 버그다. 같은 JWT 주체로 네이티브 Cursor CLI는 ActionRequiredError: Review Data Policy…처럼 제목·본문을 보여 주는데, OpenCodex POST /v1/responses는 stream disconnected… Cursor invalid request: Cursor Connect error failed_precondition: Error만 남긴다. 보고자가 Connect end-stream을 파서 앞에서 따로 잡아 보면, code=failed_precondition, message=Error, 그리고 aiserver.v1.ErrorDetails detail(안에 ERROR_MODEL_BLOCKED, title/detail, actionRequired: config)이 있다. 그 구조가 클라이언트까지 안 가고 message 문자열만 올라가는 게 핵심이다.

    지금 dev(HEAD 8e6c99608, package 2.54.0)의 경로를 보면 원인 후보가 분명하다. src/adapters/cursor/live-transport.ts의 parseConnectEndStreamError는 JSON에서 error.code와 error.message만 읽어 Cursor Connect error ${code}: ${message} Error를 만든다. detail/ErrorDetails/debug 필드는 버린다. 그 다음 src/adapters/cursor/cursor-errors.ts의 classifyCursorError는 failed_precondition을 의도적으로 “Cursor invalid request”(비재시도 400)로 묶는다. 플랜 게이트를 502/재시도로 오인하지 않으려는 설계는 맞지만, 입력 문자열이 이미 failed_precondition: Error뿐이면 사용자에게 남는 말도 “invalid request + Error”뿐이다. safeCursorErrorMessage는 그 앞에 분류 접두만 붙이고 sanitize한다. 결과적으로 정책 동의 UX가 통째로 증발한다.

    재현도 좁다. 도구 0개·짧은 프롬프트·Fable 5.1 medium/high만 실패하고, 같은 계정으로 cursor/auto-intelligence는 성공한다. 스트리밍이라 HTTP 200에 response.failed가 오고, usage는 400으로 잡힌다. 동의 버튼을 대신 눌러 주거나 계정을 바꾸는 수정은 안 된다. 해야 할 일은 Connect detail에서 제목·본문·비재시도 힌트만 안전하게 골라 사용자 메시지로 이어 주는 것이다. v2.53.0이 이미 태그된 뒤라 핫픽스 후보로 보기 좋고, Cursor 어댑터 오류 표면만 건드리면 된다.

    라인 문제
    src/adapters/cursor/live-transport.ts parseConnectEndStreamError - Connect error.details(또는 protobuf Any/ErrorDetails)를 무시하고 code+message만 Error로 올려, message="Error"일 때 정책 안내가 사라진다.
    src/adapters/cursor/cursor-errors.ts classifyCursorError / safeCursorErrorMessage - failed_precondition→invalid request 매핑은 맞지만, 구조화 detail이 없으면 분류만 남고 행동 안내가 없다.
    심볼 ERROR_MODEL_BLOCKED / actionRequired: config - 네이티브 CLI가 쓰는 신호인데 OCX 경로에 대응 분기가 없다.
    심볼 스트리밍 response.failed + usage 400 - 상태 코드 선택은 대체로 맞지만, 본문 문구가 비어 재현·지원이 어렵다.

    메인테이너의 판단이 필요한 지점

    • detail을 JSON debug 문자열에서 파싱할지, protobuf ErrorDetails를 정식 디코드할지(의존성·생성 코드 범위).
    • 사용자에게 보일 최대 길이·허용 필드(title/detail만 vs 버튼/analyticsMetadata까지).
    • Fable만이 아니라 같은 Connect detail 모양의 다른 action-required에도 같은 경로를 쓸지.

    너의 추천
    parseConnectEndStreamError에서 detail을 읽어 title/detail(또는 동등 필드)을 메시지에 붙이고, failed_precondition+ERROR_MODEL_BLOCKED는 비재시도 invalid_request로 유지한 채 “Cursor에서 데이터 정책을 확인하라”는 한 줄을 남기는 작은 PR을 열자. 동의 API를 프록시에서 호출하지 말 것. 재현 fixture는 redacted end-stream JSON 한 장으로 충분하다.

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

  3. added a commit that references this issue on Sep 14, 2026
    c66709f
  4. lidge-jun commented on Sep 14, 2026

    @lidge-jun
    Owner

    Fixed on dev by c66709f.

    parseConnectEndStreamError in src/adapters/cursor/live-transport.ts now routes Connect error details through a new src/adapters/cursor/policy-error.ts, which does a bounded read-only projection of the error detail and returns code-owned text together with the Cursor dashboard review link. The data-policy "action required" condition no longer collapses into a bare failed_precondition. No upstream strings, buttons, URLs or debug fields are forwarded, and the non-retryable 400 shape is unchanged.

    Thanks to @HeiTuz, whose PR #4509 is carried into this change with a Co-authored-by trailer.

  5. added a commit that references this issue on Sep 17, 2026
    4f5c709
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

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions