{"record":{"id":"fbb872311a6466c1","repo":"aaif-goose/goose","slug":"goose-binary-does-not-exist-or-is-not-a-file-a","errorCode":null,"errorMessage":"--goose-binary does not exist or is not a file: {args.goose_binary}","messagePattern":"--goose-binary does not exist or is not a file: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"evals/harbor/runner.py","lineNumber":138,"sourceCode":"        dataset[\"ref\" if \"/\" in name else \"version\"] = ref\n    if tasks:\n        dataset[\"task_names\"] = tasks\n    return dataset\n\n\ndef build_harbor_config(args: argparse.Namespace) -> dict[str, Any]:\n    if \"/\" not in args.model:\n        raise ValueError(\"--model must be in provider/model form, e.g. anthropic/claude-sonnet-4-6\")\n    if args.trials < 1:\n        raise ValueError(\"--trials must be at least 1\")\n    if args.concurrency < 1:\n        raise ValueError(\"--concurrency must be at least 1\")\n    if args.timeout_multiplier <= 0:\n        raise ValueError(\"--timeout-multiplier must be positive\")\n\n    goose_binary = args.goose_binary.expanduser().resolve()\n    if not goose_binary.is_file():\n        raise ValueError(f\"--goose-binary does not exist or is not a file: {args.goose_binary}\")\n\n    config_yaml, extension_entries = render_goose_config(args.extensions)\n\n    provider = args.model.split(\"/\", 1)[0]\n    missing_secrets = [\n        key for key in PROVIDER_SECRETS.get(provider, []) if not os.environ.get(key)\n    ]\n    if missing_secrets:\n        raise ValueError(\n            f\"Missing env vars for provider '{provider}': {', '.join(missing_secrets)}. \"\n            f\"Set them in a .env file (cwd or {HARBOR_DIR}) or your shell.\"\n        )\n\n    agent_kwargs: dict[str, Any] = {\n        \"goose_binary\": str(goose_binary),\n        \"config_yaml\": config_yaml,\n        \"extension_entries\": extension_entries,\n        \"install_goose_runtime_deps\": args.install_goose_runtime_deps,","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/evals/harbor/runner.py#L120-L156","documentation":"Raised by build_harbor_config in the harbor benchmark runner when the --goose-binary path, after expanduser().resolve(), is not a regular file. The agent executes this binary to run each trial, so a missing binary means every task would fail at spawn time; the runner checks the path up front and names the offending path in the message. Directories, dangling symlinks, and never-built targets all fail the is_file() check.","triggerScenarios":"Passing a relative path like ./target/debug/goose from a different working directory; passing the target directory instead of the binary; binary not built yet (cargo build never run); ~ shorthand for the wrong user.","commonSituations":"Fresh clones that skipped cargo build; running the eval from a different cwd than the repo root with relative paths; pointing at a release path after only a debug build (or vice versa); moving/renaming the built binary.","solutions":["Build first (cargo build or just release-binary), then pass an absolute path: --goose-binary /abs/path/to/repo/target/release/goose","Resolve the real location with 'command -v goose' or 'ls target/release/goose' and use that exact path","Confirm the path is a file, not the containing directory"],"exampleFix":"# before\npython runner.py --goose-binary ./target/debug/goose   # run from the wrong cwd\n\n# after\ncargo build\npython runner.py --goose-binary \"$(pwd)/target/debug/goose\"","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ngoose = Path(args.goose_binary).expanduser().resolve()\nassert goose.is_file(), (\n    f'build goose first (cargo build), then pass --goose-binary {goose}'\n)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build the binary before running evals","Pass absolute paths; resolve relative ones against the repo root in wrapper scripts","Verify with 'command -v goose' when using an installed binary"],"tags":["cli","filesystem","binary-path","harbor","benchmark"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}