{"record":{"id":"ae1e351637abf2fd","repo":"zed-industries/zed","slug":"zedpieragent-requires-eval-cli-container-path-the","errorCode":null,"errorMessage":"ZedPierAgent requires EVAL_CLI_CONTAINER_PATH (the eval-cli binary on the mounted volume, e.g. /data/builds/<id>/eval-cli)","messagePattern":"ZedPierAgent requires EVAL_CLI_CONTAINER_PATH \\(the eval-cli binary on the mounted volume, e\\.g\\. /data/builds/<id>/eval-cli\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"crates/eval_cli/zed_eval/pier_agent.py","lineNumber":76,"sourceCode":"    \"OPENAI_BASE_URL\",\n    \"OPENAI_API_BASE\",\n    \"GEMINI_API_BASE\",\n)\n\n\nclass ZedPierAgent(BaseInstalledAgent):\n    \"\"\"Runs Zed's headless eval-cli binary under Pier.\"\"\"\n\n    SUPPORTS_ATIF: bool = False\n\n    @staticmethod\n    def name() -> str:\n        return \"zed\"\n\n    def _container_binary_path(self) -> str:\n        path = self._get_env(\"EVAL_CLI_CONTAINER_PATH\")\n        if not path:\n            raise ValueError(\n                \"ZedPierAgent requires EVAL_CLI_CONTAINER_PATH (the eval-cli binary \"\n                \"on the mounted volume, e.g. /data/builds/<id>/eval-cli)\"\n            )\n        return path\n\n    def install_spec(self) -> AgentInstallSpec:\n        # The binary lives on the runtime-mounted volume, which isn't available at\n        # image-build time, so the real placement happens in run() via\n        # exec_as_root. install_spec only needs a non-empty, no-egress step.\n        return AgentInstallSpec(\n            agent_name=self.name(),\n            version=self._version,\n            steps=[\n                InstallStep(\n                    user=\"root\",\n                    run=\"true  # eval-cli is copied from the volume at run time\",\n                )\n            ],","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/zed_eval/pier_agent.py#L58-L94","documentation":"ZedPierAgent runs Zed's headless eval-cli binary inside a Pier container. The binary is not baked into the image; it lives on a runtime-mounted volume (for example /data/builds/<id>/eval-cli), so the agent looks up its container-side location through the EVAL_CLI_CONTAINER_PATH environment variable. When that variable is unset or empty, _container_binary_path raises this ValueError before any container work starts.","triggerScenarios":"Constructing or running the 'zed' installed agent (install_spec()/run()) in a harness where EVAL_CLI_CONTAINER_PATH was never exported; typos in the variable name; running the agent outside the Pier job that mounts the /data/builds volume; a job template whose env block was dropped.","commonSituations":"Fresh CI/harness setup that forgot the env var; volume mount path changed after a deploy so documented paths no longer match; copy-pasting a launch command that references a different build id; sandbox or exec wrappers that filter environment variables.","solutions":["Set EVAL_CLI_CONTAINER_PATH to the eval-cli binary path on the mounted volume, e.g. export EVAL_CLI_CONTAINER_PATH=/data/builds/<build-id>/eval-cli","Verify the binary exists at that path inside the container: ls -l /data/builds/<build-id>/eval-cli","Check the harness/job template actually passes the env var into the agent process (_get_env reads the agent env, not your shell)","Confirm you are going through the Pier runner that mounts the builds volume; running the agent on the host can never resolve the path"],"exampleFix":"# before\nzed-eval launch --agent zed   # ValueError: ZedPierAgent requires EVAL_CLI_CONTAINER_PATH\n\n# after\nexport EVAL_CLI_CONTAINER_PATH=/data/builds/4821/eval-cli\nzed-eval launch --agent zed","handlingStrategy":"validation","validationCode":"import os\n\nbinary_path = os.environ.get(\"EVAL_CLI_CONTAINER_PATH\", \"\")\nif not binary_path:\n    raise SystemExit(\"EVAL_CLI_CONTAINER_PATH is not set; point it at the mounted eval-cli binary, e.g. /data/builds/<id>/eval-cli\")\n# only then construct/launch the agent","typeGuard":null,"tryCatchPattern":"try:\n    agent.run(...)\nexcept ValueError as err:\n    if \"EVAL_CLI_CONTAINER_PATH\" in str(err):\n        raise SystemExit(f\"missing env: {err}\")\n    raise","preventionTips":["Export EVAL_CLI_CONTAINER_PATH in the job template rather than ad hoc in shells","Add a startup assertion listing required env vars before launching any agent","Keep the build-id-specific volume path in one config variable so docs and env stay in sync"],"tags":["environment-variable","zed-eval","pier","container","eval-cli"],"backgroundTag":"missing-env-var","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}