can1357/oh-my-pi · error · RuntimeError
OMP_BENCH_INSTALL=local requires OMP_BENCH_TARBALL (host tar
Error message
OMP_BENCH_INSTALL=local requires OMP_BENCH_TARBALL (host tarball path)
What it means
omp_local's install() supports an install mode 'local' (_install_local) that uploads a prebuilt omp tarball from the host into the environment. If OMP_BENCH_INSTALL=local is set but no tarball path was configured (OMP_BENCH_TARBALL unset), it raises this RuntimeError before doing any work, since there is nothing to upload.
Source
Thrown at packages/metaharness/agent/omp_local.py:370
self._bun = self._source_bun
cli = f"{self._source_dir}/packages/coding-agent/src/cli.ts"
q = shlex.quote
await self.exec_as_agent(
environment,
command=(
"set -e; "
f"test -x {q(self._source_bun)} || {{ echo 'omp source mode: bun mount missing' >&2; exit 5; }}; "
f"test -f {q(cli)} || {{ echo 'omp source mode: repo mount missing' >&2; exit 5; }}; "
f"test -d {q(self._source_dir + '/node_modules/@oh-my-pi')} || "
"{ echo 'omp source mode: linux deps mount missing' >&2; exit 5; }; "
f"{q(self._source_bun)} --version"
),
)
return cli
async def _install_local(self, environment: BaseEnvironment) -> str:
if not self._tarball:
raise RuntimeError(
"OMP_BENCH_INSTALL=local requires OMP_BENCH_TARBALL (host tarball path)"
)
await environment.upload_file(self._tarball, _TARBALL_DST)
app = f"{self._home}/.omp-bench/app"
await self.exec_as_agent(
environment,
command=self._wrap(
"set -e; "
f"mkdir -p {shlex.quote(app)}; "
f"tar xzf {_TARBALL_DST} -C {shlex.quote(app)} --strip-components=1; "
f"cd {shlex.quote(app)}; "
# Bundle inlines workspace TS; only externalized deps are needed.
# Skip heavy optionals (transformers/sherpa) but add the native addon.
"bun install --production --omit=optional; "
"arch=$(uname -m); "
'case "$arch" in aarch64|arm64) na=arm64 ;; x86_64|amd64) na=x64 ;; '
'*) echo "unsupported arch $arch" >&2; exit 4 ;; esac; '
# Native leaf MUST match the bundle version exactly (loader/API skewView on GitHub (pinned to 9690622007)
Solutions
- Set OMP_BENCH_TARBALL to a valid host path to the omp tarball before running.
- Alternatively pick a different install mode (source or binary) that doesn't need a tarball.
- Verify the env var is actually exported (export OMP_BENCH_TARBALL=...) so it propagates to the harness process.
- Check the tarball path exists on the host; otherwise the subsequent upload will fail too.
Example fix
# before OMP_BENCH_INSTALL=local bun run bench # after OMP_BENCH_INSTALL=local OMP_BENCH_TARBALL=/tmp/omp.tgz bun run bench
Defensive patterns
Strategy: validation
Validate before calling
import os, pathlib
if os.environ.get("OMP_BENCH_INSTALL") == "local":
tb = os.environ.get("OMP_BENCH_TARBALL")
assert tb, "OMP_BENCH_INSTALL=local requires OMP_BENCH_TARBALL"
assert pathlib.Path(tb).is_file(), f"tarball missing: {tb}" Try / catch
try:
await harness.install(env)
except RuntimeError as e:
if "requires OMP_BENCH_TARBALL" in str(e):
print("Set OMP_BENCH_TARBALL to a host tarball path, or choose install=source|binary")
sys.exit(2)
raise Prevention
- Export OMP_BENCH_TARBALL alongside OMP_BENCH_INSTALL=local in launch scripts.
- Validate required env vars at harness startup, before spawning containers.
- Keep install mode and its required vars together in one config block.
When it happens
Trigger: Setting install mode to local (via OMP_BENCH_INSTALL=local env var or equivalent option) while self._tarball (parsed from OMP_BENCH_TARBALL) is None/empty, then calling install().
Common situations: Environment variable typo or not exported to the harness process; running the harness from a shell where OMP_BENCH_TARBALL was never set; switching install mode to local without updating the tarball config.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- Unable to resolve AWS credentials. Configure static environm
- Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL
- CoreWeave Serverless Inference requires OpenAI-Project. Set
- imageUrls exposure "${name}" requires the ${name} binary on
- An OpenAI API credential is required for file uploads
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/a3a15ab549a01b43.
Report an issue: GitHub.