zed-industries/zed · error · TimeoutError
build {build_id} was not ready before the wait timeout
Error message
build {build_id} was not ready before the wait timeout What it means
Raised as TimeoutError inside modal_app.run_controller() when /data/builds/{build_id}/READY has not appeared within build_wait_timeout_secs (default 7200) while polling every 30s. The controller waits because the launch may spawn the build and the controller concurrently; if the build fails, is never spawned, or compiles longer than the budget, the controller gives up rather than waiting forever. The run is marked failed and the Modal compute stops.
Source
Thrown at crates/eval_cli/zed_eval/modal_app.py:720
try:
write_run_inputs(run_dir, run_request)
state("starting", build_id=run_request.get("build_id"))
log(f"Starting run {namespace}/{experiment_name}/{run_id}")
build_id = run_request.get("build_id")
if build_id:
build_dir = pathlib.Path("/data/builds") / build_id
ready_path = build_dir / "READY"
build_info_path = build_dir / "build-info.json"
source_patch_path = build_dir / "source.patch"
source_info_path = build_dir / "source-info.json"
state("waiting_for_build", build_id=build_id)
deadline = time.time() + int(
run_request.get("build_wait_timeout_secs") or 7200
)
while not ready_path.exists():
if time.time() >= deadline:
raise TimeoutError(
f"build {build_id} was not ready before the wait timeout"
)
log(f"Waiting for build {build_id} to become ready")
time.sleep(30)
reload_volume()
shutil.copy(build_info_path, run_dir / "build-info.json")
if source_patch_path.exists():
shutil.copy(source_patch_path, run_dir / "source.patch")
if source_info_path.exists():
shutil.copy(source_info_path, run_dir / "source-info.json")
log(f"Using build {build_id}")
provision_benchmark_dataset(run_request, log)
jobs_parent = pathlib.Path("/tmp/agent-evals/harbor-jobs")
jobs_parent.mkdir(parents=True, exist_ok=True)
command = harness_command.build_harness_command(run_request, str(jobs_parent))
redacted = config.redacted_command(command)View on GitHub (pinned to bc538def45)
Solutions
- Inspect the build that was spawned at launch (the 'Spawned build: <call-id>' line) in the Modal console for the real compile error, fix the source/patch, and relaunch.
- If the build was never spawned (e.g. referencing an existing id that does not exist on the volume), run zed-eval build first or relaunch normally so the build is created.
- Raise the wait budget via --build-wait-timeout-secs (and the build function's own timeout) when cold compiles legitimately exceed two hours.
- Verify the build exists and its state with the builds listing before spawning controllers that reference it.
Example fix
# before zed-eval run rf # build crashed at cargo zigbuild; controller waited 7200s # -> TimeoutError: build <id> was not ready before the wait timeout # after # 1) fix the compile error seen in the build call logs # 2) if compile is just slow: zed-eval run rf --build-wait-timeout-secs 14400
Defensive patterns
Strategy: validation
Validate before calling
# Before spawning a controller that references an existing build, confirm it on the volume:
builds = list_builds_function.remote(limit=100) # modal_app.list_builds
known = {b.get("build_id") for b in builds}
if run_request.get("build_id") not in known and not build_spawned_with_this_launch:
raise SystemExit("referenced build does not exist; run `zed-eval build` first") Try / catch
try:
result = controller_function.remote(run_request)
except TimeoutError as error:
# build never became READY: inspect the spawned build call's logs,
# fix the compile failure, then relaunch (retrying the wait alone won't help) Prevention
- Watch the spawned build call (id printed at launch) so a failed compile is caught early, not after the 2h wait.
- Set --build-wait-timeout-secs comfortably above worst-case cold compile time.
- Never reference a --build-id that was not built or spawned in the same launch.
When it happens
Trigger: The build_eval_cli call crashed (git fetch of the base sha failed, patch did not apply, cargo zigbuild error, OOM/Modal timeout at 7200s); a launch referencing a --build-id that was never spawned (no builder running to create READY); build_wait_timeout_secs set too low for a cold compile of a large patch.
Common situations: Retrying a run whose build legitimately failed earlier — the wait repeats and times out again unless the build is fixed; detached builds that died silently; big source changes pushing compile time past the default two hours.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- benchmark {benchmark['id']} path dataset requires repo_url
- build directory already exists but is not ready; refusing to
- Failed to parse UNIT_DATA as JSON: ${e.message}
- eval-cli binary not found at {binary}. Build it with: cargo
- build ids may only contain lowercase letters, numbers, '.',
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/1215b783d9e5cbf6.
Report an issue: GitHub.