zed-industries/zed · warning · ValueError
run request is missing a 'benchmark' block
Error message
run request is missing a 'benchmark' block
What it means
When parsing an open request's wsl argument of the form user@distro, Zed splits on '@' and rejects the value when the user part before '@' is empty, before constructing WslConnectionOptions. It guards the remote connection options against a blank username.
Solutions
- Omit the user to connect with the default: zed --wsl Ubuntu-22.04
- Or supply a real username: zed --wsl me@Ubuntu-22.04
- Check the script/variable that builds the argument for an unset or empty user variable
Example fix
# before zed --wsl @Ubuntu-22.04 # empty user before '@' # after zed --wsl Ubuntu-22.04 # default user # or zed --wsl me@Ubuntu-22.04
Defensive patterns
Strategy: validation
Validate before calling
// Validate the wsl argument before building connection options:
if let Some((user, _)) = wsl.split_once('@') {
ensure!(!user.is_empty(), "user is empty in wsl argument (use 'distro' or 'user@distro')");
} Type guard
fn wsl_arg_is_well_formed(wsl: &str) -> bool {
match wsl.split_once('@') {
Some((user, distro)) => !user.is_empty() && !distro.is_empty(),
None => !wsl.is_empty(),
}
} Prevention
- Build '--wsl' args from checked variables; skip the user@ prefix entirely when the user is unknown
- Validate deep-link/CLI payloads at the boundary so malformed wsl values get a helpful message, not a connection attempt
When it happens
Trigger: Passing a wsl argument whose text before '@' is empty: 'zed --wsl @Ubuntu-22.04', or an equivalent open-request payload (CLI flag, deep link) with wsl = "@Distro".
Common situations: Hand-typed CLI invocations or scripts that template the user ('--wsl ${USER}@Ubuntu' with USER unset); malformed deep links from other tools.
Related errors
- user is empty in wsl argument
- --languages and/or --extensions is required (use --list to…
- percentage must be between 0 and 100, got
- Autoupdate failed, nothing to rollback
- Autoupdate failed, rollback successful
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/9dfdaf8ea1340cc6.
Report an issue: GitHub.
Appendix: source
Thrown at crates/eval_cli/zed_eval/harness_command.py:19
"""Build the harness command (Harbor or Pier) for a benchmark run request.
The command is driven by the self-describing `benchmark` block embedded in a run
request (see `benchmarks.benchmark_metadata`), so it works for any registered
benchmark without a separate experiment registry lookup.
"""
from __future__ import annotations
import json
from typing import Any
from . import benchmarks, config
def _benchmark_block(run_request: dict[str, Any]) -> dict[str, Any]:
block = run_request.get("benchmark")
if not isinstance(block, dict):
raise ValueError("run request is missing a 'benchmark' block")
return block
def dataset_args(benchmark: dict[str, Any]) -> list[str]:
dataset = benchmark.get("dataset") or {}
kind = dataset.get("kind")
if kind == benchmarks.DATASET_REGISTRY:
name = dataset.get("name")
if not name:
raise ValueError("registry dataset requires a name")
return ["-d", name]
if kind in (benchmarks.DATASET_PATH, benchmarks.DATASET_PIER_PATH):
data_dir = dataset.get("data_dir")
if not data_dir:
raise ValueError("path dataset requires data_dir")
return ["-p", dataset_path(benchmark)]
raise ValueError(f"unsupported dataset kind: {kind}")
View on GitHub (pinned to f4178619ac)