diegosouzapw/OmniRoute · error

Cursor returned an empty turn (often usage/quota exhausted).

Error message

Cursor returned an empty turn (often usage/quota exhausted). Try model "auto", or check Usage → Provider Limits / raise Cursor limits.

What it means

Error "Cursor returned an empty turn (often usage/quota exhausted). Try model "auto", or check Usage → Provider Limits / raise Cursor limits." thrown in diegosouzapw/OmniRoute.

Source

Thrown at open-sse/executors/cursor/cursorErrors.ts:226

/** Produce a classified, secret-safe Cursor error for HTTP / SSE responses. */
export function classifyCursorError(rawMessage: string): ClassifiedCursorError {
  const kind = classifyCursorErrorKind(rawMessage);
  const detail = sanitize(rawMessage)
    .replace(/resource[_ ]exhausted/gi, "resource limit exceeded")
    .slice(0, 500);
  const prefix = kindPrefix(kind);
  const message = detail.startsWith(prefix) ? detail : detail ? `${prefix}: ${detail}` : prefix;
  return {
    kind,
    status: kindToStatus(kind),
    type: kindToType(kind),
    message,
  };
}

export const CURSOR_EMPTY_TURN_MESSAGE =
  'Cursor returned an empty turn (often usage/quota exhausted). Try model "auto", or check Usage → Provider Limits / raise Cursor limits.';

/**
 * Resolve the error to emit when a Cursor turn ends with no assistant text/tool_calls.
 * Prefer classifying an upstream JSON/error message; otherwise use the empty-turn hint.
 * When `quotaExhaustedHint` is true (fresh Provider Limits cache), force 429.
 */
export function resolveCursorEmptyTurnError(options: {
  upstreamMessage?: string | null;
  quotaExhaustedHint?: boolean;
}): ClassifiedCursorError {
  const upstream = options.upstreamMessage?.trim();
  if (upstream) {
    const classified = classifyCursorError(upstream);
    if (options.quotaExhaustedHint && classified.kind !== "auth") {
      return {
        ...classified,
        kind: "rate_limit",
        status: 429,

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at open-sse/executors/cursor/cursorErrors.ts:226 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/f6556b390f4004cb. Report an issue: GitHub.