zed-industries/zed · error · ValueError
unknown benchmark ' ' (valid: )
Error message
unknown benchmark '{benchmark_id}' (valid: {valid}) What it means
Zed's terminal failed to spawn the shell subprocess for a task; spawn_task_subprocess returned Err and it is wrapped in TerminalError, whose display includes the working directory, shell command, and the underlying io error. The failure happens before the terminal process exists at all — it is an exec/environment problem, not a crash of a running shell.
Solutions
- Confirm the working directory printed in the message exists and is a directory
- Verify the shell program: run 'which zsh' (or your shell) and check terminal.program in settings
- Fix permissions (chmod +x) or correct the task's command string
- Read the chained IOError for the OS-level reason: ENOENT means missing program/dir, EACCES means permissions
Example fix
// settings.json — before
"terminal": { "program": "/usr/local/bin/fish" } // stale path after brew upgrade
// after
"terminal": { "program": "fish" } // resolve via PATH, or point at /opt/homebrew/bin/fish Defensive patterns
Strategy: try-catch
Validate before calling
// Validate spawn preconditions before creating the terminal:
if let Some(cwd) = &working_directory {
ensure!(cwd.is_dir(), "working directory does not exist: {}", cwd.display());
}
let program_path = which::which(program)?; // resolves via PATH, fails fast with a clear error
ensure!(program_path.executable(), "no exec permission on {}", program_path.display()); Try / catch
match terminal_result {
Err(TerminalError { directory, program, source, .. }) => {
// Compose a toast from the fields: directory, program, and the OS error text.
show_toast(format!("{}: {directory:?} {} {source}",
"failed to start shell", program.clone().unwrap_or_default()));
}
Ok(terminal) => { /* ... */ }
} Prevention
- Pre-resolve terminal.program through PATH once at settings load so a bad path fails loudly and early
- Validate task cwd fields in settings against the filesystem and warn in the task spinner UI
- After OS/shell upgrades, re-check that configured shell paths still exist (e.g. /usr/local/bin → /opt/homebrew/bin)
When it happens
Trigger: spawn_task_subprocess fails: the shell program from terminal settings or the task definition is not found (ENOENT), the task's working directory does not exist, exec permission is denied (EACCES), or a malformed environment blocks spawn.
Common situations: terminal.program points to a binary not on PATH or misspelled; the task's cwd was deleted or lives on an unmounted drive; a custom shell script lacks the exec bit; macOS Gatekeeper blocks an unsigned shell binary.
Related errors
- archive links are not supported
- build ids may only contain lowercase letters, numbers, '.'…
- `cd` directory was not in any root directory in the project.
- Command failed with status
- failed to create archive.tar.gz
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/f347ab5a4b2ae732.
Report an issue: GitHub.
Appendix: source
Thrown at crates/eval_cli/zed_eval/benchmarks.py:175
"qna": "swe-atlas-qna",
"rf": "swe-atlas-rf",
"tw": "swe-atlas-tw",
"tb21": "terminal-bench-2.1",
}
SWE_ATLAS_PART_BENCHMARKS: dict[str, str] = {
"qna": "swe-atlas-qna",
"rf": "swe-atlas-rf",
"tw": "swe-atlas-tw",
}
def get_benchmark(benchmark_id: str) -> Benchmark:
try:
return BENCHMARKS[benchmark_id]
except KeyError as error:
valid = ", ".join(sorted(BENCHMARKS))
raise ValueError(
f"unknown benchmark '{benchmark_id}' (valid: {valid})"
) from error
def is_benchmark_selector(selector: str) -> bool:
"""Whether `selector` names a known benchmark id, alias, or group.
Used by `run` to validate benchmark positionals before preparing builds."""
normalized = selector.strip().lower()
return (
normalized in BENCHMARK_GROUPS
or normalized in BENCHMARKS
or normalized in BENCHMARK_ALIASES
)
def resolve_benchmark_selector(selector: str) -> list[str]:
"""Expands a user-facing selector (benchmark id, alias, or group) into theView on GitHub (pinned to f4178619ac)