diegosouzapw/OmniRoute · error

cursor-agent binary not executable at ${binary}

Error message

cursor-agent binary not executable at ${binary}

What it means

Error "cursor-agent binary not executable at ${binary}" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/providerModels/cursorAgent.ts:196

  const timeoutMs = options.timeoutMs ?? 5000;

  if (!binary) {
    throw new Error(
      "cursor-agent binary not found. Install it (curl https://cursor.com/install -fsS | bash) so ~/.local/bin/cursor-agent exists, or pass a binary path explicitly."
    );
  }

  const startedAt = Date.now();
  let result: { stdout: string; stderr: string };
  try {
    // Modern Cursor Agent releases provide a dedicated catalog flag. Prefer the
    // flag over the equivalent `models` subcommand because older releases can
    // interpret an unknown positional subcommand as an agent prompt.
    result = await runCursorAgent(binary, ["--list-models"], timeoutMs);
  } catch (err: unknown) {
    const e = err as NodeJS.ErrnoException;
    if (e?.code === "ENOENT") {
      throw new Error(`cursor-agent binary not executable at ${binary}`);
    }
    throw err;
  }
  let combined = `${result.stdout}\n${result.stderr}`;
  let ids = parseCursorAgentModels(combined);

  // Backward compatibility for releases from before the dedicated catalog interface.
  if (ids.length === 0 && !/Authentication required|Not logged in/i.test(combined)) {
    const remainingTimeoutMs = timeoutMs - (Date.now() - startedAt);
    if (remainingTimeoutMs > 0) {
      result = await runCursorAgent(binary, ["--model", "--help"], remainingTimeoutMs);
      combined = `${result.stdout}\n${result.stderr}`;
      ids = parseCursorAgentModels(combined);
    }
  }

  if (ids.length === 0) {
    if (/Authentication required|Not logged in/i.test(combined)) {

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/providerModels/cursorAgent.ts:196 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/69699a1fdf553465. Report an issue: GitHub.