{"record":{"id":"364973c19de294e7","repo":"headroomlabs-ai/headroom","slug":"error-omp-not-found-in-path","errorCode":null,"errorMessage":"Error: 'omp' not found in PATH.","messagePattern":"Error: 'omp' not found in PATH\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"headroom/cli/wrap.py","lineNumber":7766,"sourceCode":"    omp's other providers (OpenAI-direct, Gemini, ...) keep their normal\n    endpoints; route those via your own custom provider in models.yml.\n\n    \\b\n    Examples:\n        headroom wrap omp                       # Start proxy + omp\n        headroom wrap omp -- -p \"fix the bug\"   # omp in non-interactive print mode\n        headroom wrap omp -- --model opus       # Pick a model (fuzzy match)\n        headroom unwrap omp                     # Restore pre-wrap models.yml\n    \"\"\"\n    if prepare_only:\n        _inject_omp_models_override(port, _project_name_from_cwd())\n        return\n\n    omp_bin = shutil.which(\"omp\")\n    if not omp_bin:\n        click.echo(\"Error: 'omp' not found in PATH.\")\n        click.echo(\"Install Oh My Pi: npm install -g @oh-my-pi/pi-coding-agent\")\n        raise SystemExit(1)\n\n    env, env_vars_display = _build_omp_launch_env(\n        port, os.environ, project=_project_name_from_cwd()\n    )\n\n    # Durable endpoint redirect (survives omp-spawned child sessions, which\n    # re-read models.yml rather than inheriting a parent env) — same durable\n    # wrap + backup + unwrap contract as the Codex config.toml injection.\n    models_file, _ = _inject_omp_models_override(port, _project_name_from_cwd())\n    click.echo(f\"  models.yml override written: {models_file}\")\n\n    _launch_tool(\n        binary=omp_bin,\n        args=omp_args,\n        env=env,\n        port=port,\n        no_proxy=no_proxy,\n        tool_label=\"OMP\",","sourceCodeStart":7748,"sourceCodeEnd":7784,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/cli/wrap.py#L7748-L7784","documentation":"Thrown by `headroom wrap omp` when the Oh My Pi binary (`omp`) is not found via shutil.which. Unlike the openhands variant, `--prepare-only` here still writes the models.yml override before returning; the PATH check only applies to the launch path. On failure the command exits before building the launch env or injecting the durable models.yml redirect.","triggerScenarios":"Running `headroom wrap omp` (interactive, `-p` print mode, or `--model opus`) when `omp` is not resolvable on PATH. Not raised with `--prepare-only`, which instead calls _inject_omp_models_override and returns.","commonSituations":"Oh My Pi not installed globally (`npm install -g @oh-my-pi/pi-coding-agent` never run); installed under a different Node version via nvm so the global bin is off PATH; CI containers without the tool.","solutions":["Install Oh My Pi: `npm install -g @oh-my-pi/pi-coding-agent`","Ensure the npm global bin directory is on PATH (especially across nvm switches) and verify with `which omp`","Retry `headroom wrap omp` once `omp --version` succeeds","Use `headroom wrap omp --prepare-only` if you only want the models.yml endpoint override written without launching"],"exampleFix":"# before\nheadroom wrap omp -- -p \"fix the bug\"\n# Error: 'omp' not found in PATH.\n\n# after\nnpm install -g @oh-my-pi/pi-coding-agent\nexec $SHELL  # reload PATH\nheadroom wrap omp -- -p \"fix the bug\"","handlingStrategy":"validation","validationCode":"import shutil\n\nif shutil.which(\"omp\") is None:\n    raise SystemExit(\"omp missing — install with `npm install -g @oh-my-pi/pi-coding-agent`\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Probe for omp before scripting wrap commands","Note --prepare-only writes models.yml even without omp; plan unwrap accordingly","Keep `headroom unwrap omp` available to restore pre-wrap models.yml after failed attempts"],"tags":["cli","path","dependency","omp","oh-my-pi","wrap"],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}