{"record":{"id":"56bd43b12ff7f8c4","repo":"zed-industries/zed","slug":"eval-cli-binary-not-found-at-binary-build-it-wi","errorCode":null,"errorMessage":"eval-cli binary not found at {binary}. Build it with: cargo build --release -p eval_cli","messagePattern":"eval-cli binary not found at (.+?)\\. Build it with: cargo build --release -p eval_cli","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"crates/eval_cli/zed_eval/agent.py","lineNumber":101,"sourceCode":"        await self._install_uv_and_ruff(environment)\n\n        # Modal can mount a prebuilt binary inside each sandbox, avoiding uploads.\n        container_path = self._extra_env.get(\"EVAL_CLI_CONTAINER_PATH\")\n        if container_path:\n            await self.exec_as_root(\n                environment,\n                command=(\n                    f\"cp {shlex.quote(container_path)} /usr/local/bin/eval-cli && \"\n                    \"chmod +x /usr/local/bin/eval-cli && \"\n                    \"eval-cli --help\"\n                ),\n            )\n            return\n\n        if self._binary_path:\n            binary = Path(self._binary_path)\n            if not binary.exists():\n                raise FileNotFoundError(\n                    f\"eval-cli binary not found at {binary}. \"\n                    \"Build it with: cargo build --release -p eval_cli\"\n                )\n            await environment.upload_file(\n                source_path=binary,\n                target_path=\"/usr/local/bin/eval-cli\",\n            )\n            await self.exec_as_root(\n                environment,\n                command=\"chmod +x /usr/local/bin/eval-cli && eval-cli --help\",\n            )\n            return\n\n        if self._download_url:\n            await self.exec_as_root(\n                environment,\n                command=(\n                    f\"curl -fsSL {shlex.quote(self._download_url)} \"","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/eval_cli/zed_eval/agent.py#L83-L119","documentation":"The eval agent was configured with an explicit _binary_path, but that path doesn't exist on the host — canonically, target/release/eval-cli was pointed at before the crate was built. The FileNotFoundError carries the fix in its own text: build the crate in release mode.","triggerScenarios":"Passing binary_path=target/release/eval-cli (or the corresponding env var) without having run `cargo build --release -p eval_cli`; an absolute path from a different checkout or machine; a typo in the path; CI caching that wiped target/.","commonSituations":"First eval runs on a fresh clone; target/ cleaned by cargo-clean or cache eviction; repo moved after configuration.","solutions":["Build the binary: `cargo build --release -p eval_cli`","Verify the artifact exists: `ls -l target/release/eval-cli`","If the binary lives elsewhere, pass an absolute path, or use one of the other channels: download_url=/EVAL_CLI_DOWNLOAD_URL or --ae EVAL_CLI_CONTAINER_PATH=/path/inside/container"],"exampleFix":"# before\nrun(..., binary_path=\"target/release/eval-cli\")   # FileNotFoundError: not built yet\n\n# after\ncargo build --release -p eval_cli\nrun(..., binary_path=\"target/release/eval-cli\")","handlingStrategy":"validation","validationCode":"from pathlib import Path\nif binary_path and not Path(binary_path).exists():\n    raise SystemExit(f\"{binary_path} missing — run `cargo build --release -p eval_cli` first\")","typeGuard":"from pathlib import Path\n\ndef is_built_binary(path):\n    return path is not None and Path(path).is_file()","tryCatchPattern":"try:\n    ...provision...\nexcept FileNotFoundError as e:\n    raise SystemExit(f\"{e} — build with: cargo build --release -p eval_cli\")","preventionTips":["Always build -p eval_cli before launching eval runs","Resolve binary_path to an absolute path when configuring the agent","In CI, make the build step a declared dependency of the eval step"],"tags":["python","eval-cli","build","file-not-found"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}