Yeachan-Heo/oh-my-codex · error

[sparkshell] failed to launch native binary: executable is b

Error message

[sparkshell] failed to launch native binary: executable is blocked (${errno.code || 'blocked'})

What it means

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.

Source

Thrown at src/cli/sparkshell.ts:441

      runSparkShellFallback(args, { cause: error, state: 'resolution-failed' });
      return;
    }
    throw error;
  }
  const result = runSparkShellBinary(binaryPath, args);

  if (result.error) {
    const errno = result.error as NodeJS.ErrnoException;
    const kind = classifySpawnError(errno);
    if (!hasExplicitOverride && (kind === 'missing' || kind === 'blocked')) {
      runSparkShellFallback(args, { cause: errno, nativePath: binaryPath, state: kind });
      return;
    }
    if (kind === 'missing') {
      throw new Error(`[sparkshell] failed to launch native binary: executable not found (${binaryPath})`);
    }
    if (kind === 'blocked') {
      throw new Error(`[sparkshell] failed to launch native binary: executable is blocked (${errno.code || 'blocked'})`);
    }
    throw new Error(`[sparkshell] failed to launch native binary: ${errno.message}`);
  }

  if (!hasExplicitOverride && isSparkShellNativeCompatibilityFailure(result)) {
    runSparkShellFallback(args, {
      cause: result.stderr || 'GLIBC-incompatible native sidecar',
      nativePath: binaryPath,
      state: 'glibc-incompatible',
    });
    return;
  }

  writeSparkShellResultOutput(result);

  if (result.status !== 0) {
    process.exitCode = typeof result.status === 'number'
      ? result.status

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. `chmod +x "$OMX_SPARKSHELL_BIN"`
  2. Reinstall the package to restore correct permissions
  3. Unset the override so sparkshell can fall back

Example fix

# before
OMX_SPARKSHELL_BIN=./bin/sparkshell sparkshell bash  # EACCES
# after
chmod +x ./bin/sparkshell
OMX_SPARKSHELL_BIN=./bin/sparkshell sparkshell bash
Defensive patterns

Strategy: validation

Validate before calling

import { accessSync, constants } from 'node:fs';
if (bin) accessSync(bin, constants.X_OK); // throws if not executable

Prevention

When it happens

Trigger: OMX sparkshell bin env var points at a non-executable file; the packaged binary lost its execute bit during install.

Common situations: npm/pnpm installs on filesystems that drop the exec bit; containers copying binaries with COPY --chmod errors; macOS quarantine on manually placed binaries.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/1df28a0c081f44cd. Report an issue: GitHub.