{"record":{"id":"41312e0d28658d85","repo":"paperclipai/paperclip","slug":"options-errorlabel-decision-predicate-failed","errorCode":null,"errorMessage":"${options.errorLabel} decision predicate failed: ${detail}","messagePattern":"(.+?) decision predicate failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/codex-local/src/server/codex-auth-merge-decision.ts","lineNumber":73,"sourceCode":"  const args = options.seedIfDestAbsent\n    ? [DECISION_SCRIPT_PATH, SEED_IF_DEST_ABSENT_FLAG, sourcePath, destinationPath]\n    : [DECISION_SCRIPT_PATH, sourcePath, destinationPath];\n  try {\n    await execFile(\"node\", args);\n  } catch (error) {\n    const code = (error as { code?: unknown }).code;\n    if (typeof code === \"number\" && KNOWN_EXIT_CODES.has(code)) {\n      return code;\n    }\n    const detail =\n      typeof code === \"string\"\n        ? `node could not be executed (${code})`\n        : typeof code === \"number\"\n          ? `unexpected predicate exit code ${code}`\n          : error instanceof Error\n            ? error.message\n            : String(error);\n    throw new Error(`${options.errorLabel} decision predicate failed: ${detail}`);\n  }\n  // `execFile` resolved, so the predicate exited 0. The predicate always exits\n  // 10, 20, or 22, so a clean exit 0 is unexpected; fail loud.\n  throw new Error(\n    `${options.errorLabel} decision predicate exited 0 (expected 10, 20, or 22)`,\n  );\n}\n","sourceCodeStart":55,"sourceCodeEnd":81,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapters/codex-local/src/server/codex-auth-merge-decision.ts#L55-L81","documentation":"Wrapper error for the Codex auth merge decision helper: decideCodexAuthMerge shells out to a Node decision script and maps known exit codes to decisions; when execFile('node') fails with something outside KNOWN_EXIT_CODES — e.g. node could not be spawned (ENOENT/EACCES reported as a string code) or the predicate crashed with an unexpected exit code — it surfaces a labeled failure so callers can distinguish 'predicate answered' from 'predicate never ran'. Generic guard: the input at fault is the node execution environment or the decision script itself, not the merge decision.","triggerScenarios":"Thrown at packages/adapters/codex-local/src/server/codex-auth-merge-decision.ts:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the decision predicate failure detail and fix the predicate or its inputs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}