Yeachan-Heo/oh-my-codex · warning
[omx] warning: failed to launch notify fallback watcher
Error message
[omx] warning: failed to launch notify fallback watcher
What it means
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.
Source
Thrown at src/cli/index.ts:7793
notifyScript,
"--pid-file",
pidPath,
"--parent-pid",
String(process.pid),
...(process.env.OMX_NOTIFY_FALLBACK_MAX_LIFETIME_MS
? [
"--max-lifetime-ms",
process.env.OMX_NOTIFY_FALLBACK_MAX_LIFETIME_MS,
]
: []),
],
{
cwd,
env: watcherEnv,
},
);
} catch (error: unknown) {
console.warn("[omx] warning: failed to launch notify fallback watcher", {
cwd,
error: error instanceof Error ? error.message : String(error),
});
return;
}
if (!watcherPid) return;
await writeFile(
pidPath,
JSON.stringify(
{ pid: watcherPid, started_at: new Date().toISOString() },
null,
2,
),
).catch((error: unknown) => {
console.warn(
"[omx] warning: failed to write notify fallback watcher pid file",View on GitHub (pinned to 3ad79a8a6f)
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
Example fix
// before # watcher script missing after partial install # after npm rebuild omx # or reinstall to restore helper scripts chmod +x node_modules/omx/dist/notify-fallback-watcher.js
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, accessSync, constants } from 'node:fs';
function watcherLaunchable(script: string, nodeOnPath: boolean): boolean {
return existsSync(script) && nodeOnPath && (accessSync(script, constants.X_OK), true);
} Prevention
- Verify node and helper script paths before launching
- Pin installs to intact package versions
- Test with `node <watcherScript> --help` once after install
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- [omx] warning: failed to launch hook-derived watcher
- [api] failed to launch native binary: executable not found (
- [api] failed to launch native binary: executable is blocked
- [api] failed to launch native binary: ${errno.message}
- [ask] failed to launch advisor script: ${child.error.message
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/35ac7f0dc5e6adb4.
Report an issue: GitHub.