{"record":{"id":"6f13f57e131c80a1","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-failed-to-launch-native-binary-execu","errorCode":null,"errorMessage":"[sparkshell] failed to launch native binary: executable not found (${binaryPath})","messagePattern":"\\[sparkshell\\] failed to launch native binary: executable not found \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":438,"sourceCode":"    binaryPath = await resolveSparkShellBinaryPathWithHydration();\n  } catch (error) {\n    if (!hasExplicitOverride) {\n      runSparkShellFallback(args, { cause: error, state: 'resolution-failed' });\n      return;\n    }\n    throw error;\n  }\n  const result = runSparkShellBinary(binaryPath, args);\n\n  if (result.error) {\n    const errno = result.error as NodeJS.ErrnoException;\n    const kind = classifySpawnError(errno);\n    if (!hasExplicitOverride && (kind === 'missing' || kind === 'blocked')) {\n      runSparkShellFallback(args, { cause: errno, nativePath: binaryPath, state: kind });\n      return;\n    }\n    if (kind === 'missing') {\n      throw new Error(`[sparkshell] failed to launch native binary: executable not found (${binaryPath})`);\n    }\n    if (kind === 'blocked') {\n      throw new Error(`[sparkshell] failed to launch native binary: executable is blocked (${errno.code || 'blocked'})`);\n    }\n    throw new Error(`[sparkshell] failed to launch native binary: ${errno.message}`);\n  }\n\n  if (!hasExplicitOverride && isSparkShellNativeCompatibilityFailure(result)) {\n    runSparkShellFallback(args, {\n      cause: result.stderr || 'GLIBC-incompatible native sidecar',\n      nativePath: binaryPath,\n      state: 'glibc-incompatible',\n    });\n    return;\n  }\n\n  writeSparkShellResultOutput(result);\n","sourceCodeStart":420,"sourceCodeEnd":456,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L420-L456","documentation":"sparkshell tried to launch its native sidecar binary and spawnSync classified the failure as 'missing' (ENOENT) — and an explicit binary override (OMX sparkshell bin env var) was set, so the tmux fallback path is skipped and the error is raised directly.","triggerScenarios":"Setting the sparkshell bin env var to a path that does not exist, then running sparkshell.","commonSituations":"Pointing the override at a not-yet-built binary, a stale install path after an upgrade moved the sidecar, or typos in the env var value.","solutions":["Fix the override path or unset it to allow fallback: verify with `ls -l \"$OMX_SPARKSHELL_BIN\"`","Rebuild/reinstall the package so the bundled binary exists at the expected path","With an override, no tmux fallback occurs — ensure the path is correct or intentionally omit the override"],"exampleFix":"# before\nOMX_SPARKSHELL_BIN=/opt/sparkshell/sparkshell sparkshell bash  # missing file\n# after\nunset OMX_SPARKSHELL_BIN\nsparkshell bash","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nconst bin = process.env.OMX_SPARKSHELL_BIN;\nif (bin && !existsSync(bin)) throw new Error(`override binary missing: ${bin}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the env override disables the automatic fallback","Re-check override paths after package upgrades/relocations"],"tags":["spawn","binary","environment","configuration"],"backgroundTag":"executable-not-found","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}