{"record":{"id":"69699a1fdf553465","repo":"diegosouzapw/OmniRoute","slug":"cursor-agent-binary-not-executable-at-binary","errorCode":null,"errorMessage":"cursor-agent binary not executable at ${binary}","messagePattern":"cursor-agent binary not executable at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/providerModels/cursorAgent.ts","lineNumber":196,"sourceCode":"  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  }\n  let combined = `${result.stdout}\\n${result.stderr}`;\n  let ids = parseCursorAgentModels(combined);\n\n  // Backward compatibility for releases from before the dedicated catalog interface.\n  if (ids.length === 0 && !/Authentication required|Not logged in/i.test(combined)) {\n    const remainingTimeoutMs = timeoutMs - (Date.now() - startedAt);\n    if (remainingTimeoutMs > 0) {\n      result = await runCursorAgent(binary, [\"--model\", \"--help\"], remainingTimeoutMs);\n      combined = `${result.stdout}\\n${result.stderr}`;\n      ids = parseCursorAgentModels(combined);\n    }\n  }\n\n  if (ids.length === 0) {\n    if (/Authentication required|Not logged in/i.test(combined)) {","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/providerModels/cursorAgent.ts#L178-L214","documentation":"Error \"cursor-agent binary not executable at ${binary}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/providerModels/cursorAgent.ts:196 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"}