{"record":{"id":"1df28a0c081f44cd","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-failed-to-launch-native-binary-execu-1df28a","errorCode":null,"errorMessage":"[sparkshell] failed to launch native binary: executable is blocked (${errno.code || 'blocked'})","messagePattern":"\\[sparkshell\\] failed to launch native binary: executable is blocked \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":441,"sourceCode":"      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\n  if (result.status !== 0) {\n    process.exitCode = typeof result.status === 'number'\n      ? result.status","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L423-L459","documentation":"The native sparkshell binary exists but spawnSync failed with an EACCES/EPERM-classified error, and an explicit binary override was set (which disables the automatic tmux fallback). The OS-level errno code is included.","triggerScenarios":"OMX sparkshell bin env var points at a non-executable file; the packaged binary lost its execute bit during install.","commonSituations":"npm/pnpm installs on filesystems that drop the exec bit; containers copying binaries with COPY --chmod errors; macOS quarantine on manually placed binaries.","solutions":["`chmod +x \"$OMX_SPARKSHELL_BIN\"`","Reinstall the package to restore correct permissions","Unset the override so sparkshell can fall back"],"exampleFix":"# before\nOMX_SPARKSHELL_BIN=./bin/sparkshell sparkshell bash  # EACCES\n# after\nchmod +x ./bin/sparkshell\nOMX_SPARKSHELL_BIN=./bin/sparkshell sparkshell bash","handlingStrategy":"validation","validationCode":"import { accessSync, constants } from 'node:fs';\nif (bin) accessSync(bin, constants.X_OK); // throws if not executable","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify the override binary is executable before running sparkshell","Reinstall the package if bundled binary permissions look wrong"],"tags":["spawn","permissions","environment"],"backgroundTag":"permission-denied-exec","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}