headroomlabs-ai/headroom · error · SystemExit
Error: 'omp' not found in PATH.
Error message
Error: 'omp' not found in PATH.
What it means
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.
Source
Thrown at headroom/cli/wrap.py:7766
omp's other providers (OpenAI-direct, Gemini, ...) keep their normal
endpoints; route those via your own custom provider in models.yml.
\b
Examples:
headroom wrap omp # Start proxy + omp
headroom wrap omp -- -p "fix the bug" # omp in non-interactive print mode
headroom wrap omp -- --model opus # Pick a model (fuzzy match)
headroom unwrap omp # Restore pre-wrap models.yml
"""
if prepare_only:
_inject_omp_models_override(port, _project_name_from_cwd())
return
omp_bin = shutil.which("omp")
if not omp_bin:
click.echo("Error: 'omp' not found in PATH.")
click.echo("Install Oh My Pi: npm install -g @oh-my-pi/pi-coding-agent")
raise SystemExit(1)
env, env_vars_display = _build_omp_launch_env(
port, os.environ, project=_project_name_from_cwd()
)
# Durable endpoint redirect (survives omp-spawned child sessions, which
# re-read models.yml rather than inheriting a parent env) — same durable
# wrap + backup + unwrap contract as the Codex config.toml injection.
models_file, _ = _inject_omp_models_override(port, _project_name_from_cwd())
click.echo(f" models.yml override written: {models_file}")
_launch_tool(
binary=omp_bin,
args=omp_args,
env=env,
port=port,
no_proxy=no_proxy,
tool_label="OMP",View on GitHub (pinned to 322425c43b)
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
Example fix
# before headroom wrap omp -- -p "fix the bug" # Error: 'omp' not found in PATH. # after npm install -g @oh-my-pi/pi-coding-agent exec $SHELL # reload PATH headroom wrap omp -- -p "fix the bug"
Defensive patterns
Strategy: validation
Validate before calling
import shutil
if shutil.which("omp") is None:
raise SystemExit("omp missing — install with `npm install -g @oh-my-pi/pi-coding-agent`") Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Error: 'openhands' not found in PATH.
- Error: 'opencode' not found in PATH.
- {_WRAP_PROXY_TIMEOUT_ENV} must be a positive integer number
- Error: 'claude' not found in PATH.
- Error: 'copilot' not found in PATH.
AI-assisted analysis of headroomlabs-ai/headroom@322425c43b (2026-08-15).
Data as JSON: /api/errors/364973c19de294e7.
Report an issue: GitHub.