zed-industries/zed · error · FileNotFoundError

eval-cli binary not found at {binary}. Build it with: cargo

Error message

eval-cli binary not found at {binary}. Build it with: cargo build --release -p eval_cli

What it means

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.

Source

Thrown at crates/eval_cli/zed_eval/agent.py:101

        await self._install_uv_and_ruff(environment)

        # Modal can mount a prebuilt binary inside each sandbox, avoiding uploads.
        container_path = self._extra_env.get("EVAL_CLI_CONTAINER_PATH")
        if container_path:
            await self.exec_as_root(
                environment,
                command=(
                    f"cp {shlex.quote(container_path)} /usr/local/bin/eval-cli && "
                    "chmod +x /usr/local/bin/eval-cli && "
                    "eval-cli --help"
                ),
            )
            return

        if self._binary_path:
            binary = Path(self._binary_path)
            if not binary.exists():
                raise FileNotFoundError(
                    f"eval-cli binary not found at {binary}. "
                    "Build it with: cargo build --release -p eval_cli"
                )
            await environment.upload_file(
                source_path=binary,
                target_path="/usr/local/bin/eval-cli",
            )
            await self.exec_as_root(
                environment,
                command="chmod +x /usr/local/bin/eval-cli && eval-cli --help",
            )
            return

        if self._download_url:
            await self.exec_as_root(
                environment,
                command=(
                    f"curl -fsSL {shlex.quote(self._download_url)} "

View on GitHub (pinned to bc538def45)

Solutions

  1. Build the binary: `cargo build --release -p eval_cli`
  2. Verify the artifact exists: `ls -l target/release/eval-cli`
  3. 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

Example fix

# before
run(..., binary_path="target/release/eval-cli")   # FileNotFoundError: not built yet

# after
cargo build --release -p eval_cli
run(..., binary_path="target/release/eval-cli")
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
if binary_path and not Path(binary_path).exists():
    raise SystemExit(f"{binary_path} missing — run `cargo build --release -p eval_cli` first")

Type guard

from pathlib import Path

def is_built_binary(path):
    return path is not None and Path(path).is_file()

Try / catch

try:
    ...provision...
except FileNotFoundError as e:
    raise SystemExit(f"{e} — build with: cargo build --release -p eval_cli")

Prevention

When it happens

Trigger: 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/.

Common situations: First eval runs on a fresh clone; target/ cleaned by cargo-clean or cache eviction; repo moved after configuration.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/56bd43b12ff7f8c4. Report an issue: GitHub.