{"record":{"id":"8148902cdf72c362","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-raw-fallback-failed-executable-is-bl","errorCode":null,"errorMessage":"[sparkshell] raw fallback failed: executable is blocked (${errno.code || 'blocked'})","messagePattern":"\\[sparkshell\\] raw fallback failed: executable is blocked \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":395,"sourceCode":"  const { announce = true, cause = 'native sidecar unavailable', nativePath = 'native-resolution', state = 'unavailable' } = options;\n  const invocation = parseSparkShellFallbackInvocation(args);\n  if (announce) {\n    process.stderr.write(`[sparkshell] native sidecar unavailable; cause=${sanitizeFallbackDiagnostic(cause)}; path=${sanitizeFallbackDiagnostic(nativePath)}; state=${sanitizeFallbackDiagnostic(state)}; remediation=install a compatible native sidecar, reconnect for hydration, or set ${OMX_SPARKSHELL_BIN_ENV}. Falling back to raw command execution without summary support.\\n`);\n  }\n  const result = spawnSync(invocation.argv[0], invocation.argv.slice(1), {\n    cwd: process.cwd(),\n    env: process.env,\n    stdio: 'inherit',\n    encoding: 'utf-8',\n  });\n  if (result.error) {\n    const errno = result.error as NodeJS.ErrnoException;\n    const kind = classifySpawnError(errno);\n    if (kind === 'missing') {\n      throw new Error(`[sparkshell] raw fallback failed: executable not found (${invocation.argv[0]})`);\n    }\n    if (kind === 'blocked') {\n      throw new Error(`[sparkshell] raw fallback failed: executable is blocked (${errno.code || 'blocked'})`);\n    }\n    throw new Error(`[sparkshell] raw fallback failed: ${errno.message}`);\n  }\n  if (result.status !== 0) {\n    process.exitCode = typeof result.status === 'number'\n      ? result.status\n      : resolveSignalExitCode(result.signal);\n  }\n}\n\nexport async function sparkshellCommand(args: string[]): Promise<void> {\n  if (args[0] === '--help' || args[0] === '-h') {\n    console.log(SPARKSHELL_USAGE);\n    return;\n  }\n\n  if (args.length === 0) {\n    throw new Error(`Missing command to run.\\n${SPARKSHELL_USAGE}`);","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L377-L413","documentation":"spawnSync failed with an error classified as 'blocked' (e.g. EACCES/EPERM — the file exists but cannot be executed) while running the fallback program. The errno code is embedded in the message.","triggerScenarios":"tmux exists but lacks the execute bit, or a security policy (macOS quarantine, AppArmor, noexec mount) denies execution.","commonSituations":"Binaries copied without +x, files downloaded on macOS flagged by Gatekeeper, /tmp mounted noexec in containers.","solutions":["`chmod +x $(which tmux)` or fix permissions on the executable","Remove macOS quarantine: `xattr -d com.apple.quarantine /path/to/tmux`","Remount or move binaries off noexec filesystems"],"exampleFix":"# before\nsparkshell --tmux-pane 0  # EACCES\n# after\nchmod +x /usr/local/bin/tmux\nsparkshell --tmux-pane 0","handlingStrategy":"validation","validationCode":"import { accessSync, constants } from 'node:fs';\ntry { accessSync(bin, constants.X_OK); } catch { throw new Error(`${bin} is not executable`); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check X_OK on the target executable before spawning","Avoid noexec mounts and quarantine flags for tool binaries"],"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"}