{"record":{"id":"66e6a8dc77540c1c","repo":"can1357/oh-my-pi","slug":"apple-container-cli-not-found-install-with-bre","errorCode":null,"errorMessage":"Apple 'container' CLI not found. Install with: brew install container && container system start","messagePattern":"Apple 'container' CLI not found\\. Install with: brew install container && container system start","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/runner.ts","lineNumber":1549,"sourceCode":"\texitCode: number;\n\tjobName: string;\n\tjobDir: string;\n\tbenchDir: string;\n\ttarball: string | null;\n\telapsedMs: number;\n\ttotals: Totals | null;\n\treportPath: string | null;\n}\n\nasync function runBenchmark(cfg: Config): Promise<BenchmarkRun> {\n\tif (!which(\"harbor\")) {\n\t\tthrow new Error(\"harbor not found on PATH. Install with: uv tool install harbor\");\n\t}\n\tif (cfg.agent === \"omp\" && cfg.envType === \"docker\" && !which(\"docker\")) {\n\t\tthrow new Error(\"docker not found on PATH (required to run task containers).\");\n\t}\n\tif (cfg.envType === \"apple-container\" && !which(\"container\")) {\n\t\tthrow new Error(\n\t\t\t\"Apple 'container' CLI not found. Install with: brew install container && container system start\",\n\t\t);\n\t}\n\n\tconst stamp = new Date().toISOString().replace(/[:.]/g, \"-\").slice(0, 19);\n\tconst modelSlug = (cfg.models[0] ?? \"model\").replace(/[^a-zA-Z0-9]+/g, \"-\");\n\tconst jobName = cfg.jobName ?? `${modelSlug}-${stamp}`;\n\tconst jobDir = path.join(cfg.jobsDir, jobName);\n\tconst benchDir = path.join(cfg.jobsDir, \"_bench\", jobName);\n\tfs.mkdirSync(benchDir, { recursive: true });\n\tif (!cfg.resume && !cfg.dryRun) {\n\t\t// Snapshot the resolved launch config so a later `--resume <job>` can\n\t\t// rebuild the exact same invocation without re-specifying flags.\n\t\tfs.writeFileSync(path.join(benchDir, \"runner-config.json\"), JSON.stringify({ ...cfg, jobName }, null, \"\\t\"));\n\t}\n\n\tconst version = readPkgVersion();\n","sourceCodeStart":1531,"sourceCodeEnd":1567,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/runner.ts#L1531-L1567","documentation":"The metaharness runner validates that the Apple 'container' CLI is on PATH before running benchmarks with envType 'apple-container'. This error means the runner was configured to use Apple's container runtime but the binary could not be located, so it aborts before launching any task containers.","triggerScenarios":"Running the benchmark runner with cfg.agent === 'omp' (any agent actually — the check only gates on cfg.envType === 'apple-container') and cfg.envType === 'apple-container' on a machine where which('container') finds no binary.","commonSituations":"Running on Linux (Apple container CLI is macOS-only); macOS without the container package installed; container installed but the daemon not started so the CLI shim is absent from PATH; installing inside a non-homebrew environment.","solutions":["Install the Apple container CLI: brew install container","Start the container system: container system start","Verify it resolves: which container (or command -v container)","If not on macOS, switch the runner config to envType 'docker' instead"],"exampleFix":"// before (runner fails: 'container' not on PATH)\n// $ bun runner.ts --env-type apple-container ...\n\n// after (shell)\n$ brew install container && container system start\n$ which container  # confirm before rerunning","handlingStrategy":"validation","validationCode":"import { which } from \"@oh-my-pi/pi-utils\";\nif (cfg.envType === \"apple-container\" && !which(\"container\")) {\n  throw new Error(\"apple-container env requires the 'container' CLI: brew install container && container system start\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runBenchmark(cfg);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"Apple 'container' CLI not found\")) {\n    console.error(\"Install Apple container: brew install container && container system start\");\n    process.exitCode = 1;\n    return;\n  }\n  throw err;\n}","preventionTips":["Probe `which container` at startup and fail fast with an actionable message","Document macOS-only requirement for envType 'apple-container'","In CI, add a setup step installing and starting the container system before benchmarks","Validate the full environment (docker/container) once in a preflight check rather than per-env-type"],"tags":["missing-binary","apple-container","environment-setup","cli-tooling"],"backgroundTag":"missing-cli-binary-on-path","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}