{"record":{"id":"3694eb9a042404dc","repo":"diegosouzapw/OmniRoute","slug":"cursor-agent-binary-not-found-install-it-curl-ht","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/providerModels/cursorAgent.ts","lineNumber":181,"sourceCode":"    out.push(id);\n  }\n  return out;\n}\n\nexport type CursorAgentModelEntry = {\n  id: string;\n  name: string;\n  owned_by: \"cursor\";\n};\n\nexport async function fetchCursorAgentModels(\n  options: { binary?: string; timeoutMs?: number } = {}\n): Promise<CursorAgentModelEntry[]> {\n  const binary = options.binary || resolveCursorAgentBinary();\n  const timeoutMs = options.timeoutMs ?? 5000;\n\n  if (!binary) {\n    throw new Error(\n      \"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.\"\n    );\n  }\n\n  const startedAt = Date.now();\n  let result: { stdout: string; stderr: string };\n  try {\n    // Modern Cursor Agent releases provide a dedicated catalog flag. Prefer the\n    // flag over the equivalent `models` subcommand because older releases can\n    // interpret an unknown positional subcommand as an agent prompt.\n    result = await runCursorAgent(binary, [\"--list-models\"], timeoutMs);\n  } catch (err: unknown) {\n    const e = err as NodeJS.ErrnoException;\n    if (e?.code === \"ENOENT\") {\n      throw new Error(`cursor-agent binary not executable at ${binary}`);\n    }\n    throw err;\n  }","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/providerModels/cursorAgent.ts#L163-L199","documentation":"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.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/providerModels/cursorAgent.ts:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}