{"record":{"id":"35ac7f0dc5e6adb4","repo":"Yeachan-Heo/oh-my-codex","slug":"omx-warning-failed-to-launch-notify-fallback-wa","errorCode":null,"errorMessage":"[omx] warning: failed to launch notify fallback watcher","messagePattern":"\\[omx\\] warning: failed to launch notify fallback watcher","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cli/index.ts","lineNumber":7793,"sourceCode":"        notifyScript,\n        \"--pid-file\",\n        pidPath,\n        \"--parent-pid\",\n        String(process.pid),\n        ...(process.env.OMX_NOTIFY_FALLBACK_MAX_LIFETIME_MS\n          ? [\n            \"--max-lifetime-ms\",\n            process.env.OMX_NOTIFY_FALLBACK_MAX_LIFETIME_MS,\n          ]\n          : []),\n      ],\n      {\n        cwd,\n        env: watcherEnv,\n      },\n    );\n  } catch (error: unknown) {\n    console.warn(\"[omx] warning: failed to launch notify fallback watcher\", {\n      cwd,\n      error: error instanceof Error ? error.message : String(error),\n    });\n    return;\n  }\n\n  if (!watcherPid) return;\n\n  await writeFile(\n    pidPath,\n    JSON.stringify(\n      { pid: watcherPid, started_at: new Date().toISOString() },\n      null,\n      2,\n    ),\n  ).catch((error: unknown) => {\n    console.warn(\n      \"[omx] warning: failed to write notify fallback watcher pid file\",","sourceCodeStart":7775,"sourceCodeEnd":7811,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L7775-L7811","documentation":"The CLI failed to spawn the background notify fallback watcher helper (launchBackgroundHelper rejected). The watcher simply will not run; notify fallback behavior is skipped and the main flow continues.","triggerScenarios":"Spawning the watcher script (node/helper) fails: missing script file, node binary unavailable in the constructed env, EACCES on the script, or ENOENT for the interpreter.","commonSituations":"Package installation with missing files (partial npm install); node not on PATH in the child env; script lost +x permission after a git clone/transfer; antivirus or sandbox blocking child process spawn.","solutions":["Reinstall the package cleanly: `npm install -g omx@latest` (or the local equivalent)","Verify node is on PATH in the environment the CLI runs in","Check the watcher script exists and is executable under the package root"],"exampleFix":"// before\n# watcher script missing after partial install\n\n# after\nnpm rebuild omx   # or reinstall to restore helper scripts\nchmod +x node_modules/omx/dist/notify-fallback-watcher.js","handlingStrategy":"validation","validationCode":"import { existsSync, accessSync, constants } from 'node:fs';\nfunction watcherLaunchable(script: string, nodeOnPath: boolean): boolean {\n  return existsSync(script) && nodeOnPath && (accessSync(script, constants.X_OK), true);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify node and helper script paths before launching","Pin installs to intact package versions","Test with `node <watcherScript> --help` once after install"],"tags":["spawn","background-process","watcher","env"],"backgroundTag":"child-process-spawn-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}