{"record":{"id":"f347ab5a4b2ae732","repo":"zed-industries/zed","slug":"unknown-benchmark-benchmark-id-valid-valid","errorCode":null,"errorMessage":"unknown benchmark '{benchmark_id}' (valid: {valid})","messagePattern":"unknown benchmark '(.+?)' \\(valid: (.+?)\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"crates/eval_cli/zed_eval/benchmarks.py","lineNumber":175,"sourceCode":"    \"qna\": \"swe-atlas-qna\",\n    \"rf\": \"swe-atlas-rf\",\n    \"tw\": \"swe-atlas-tw\",\n    \"tb21\": \"terminal-bench-2.1\",\n}\n\nSWE_ATLAS_PART_BENCHMARKS: dict[str, str] = {\n    \"qna\": \"swe-atlas-qna\",\n    \"rf\": \"swe-atlas-rf\",\n    \"tw\": \"swe-atlas-tw\",\n}\n\n\ndef get_benchmark(benchmark_id: str) -> Benchmark:\n    try:\n        return BENCHMARKS[benchmark_id]\n    except KeyError as error:\n        valid = \", \".join(sorted(BENCHMARKS))\n        raise ValueError(\n            f\"unknown benchmark '{benchmark_id}' (valid: {valid})\"\n        ) from error\n\n\ndef is_benchmark_selector(selector: str) -> bool:\n    \"\"\"Whether `selector` names a known benchmark id, alias, or group.\n\n    Used by `run` to validate benchmark positionals before preparing builds.\"\"\"\n    normalized = selector.strip().lower()\n    return (\n        normalized in BENCHMARK_GROUPS\n        or normalized in BENCHMARKS\n        or normalized in BENCHMARK_ALIASES\n    )\n\n\ndef resolve_benchmark_selector(selector: str) -> list[str]:\n    \"\"\"Expands a user-facing selector (benchmark id, alias, or group) into the","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/zed_eval/benchmarks.py#L157-L193","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// settings.json — before\n\"terminal\": { \"program\": \"/usr/local/bin/fish\" } // stale path after brew upgrade\n\n// after\n\"terminal\": { \"program\": \"fish\" } // resolve via PATH, or point at /opt/homebrew/bin/fish","handlingStrategy":"try-catch","validationCode":"// Validate spawn preconditions before creating the terminal:\nif let Some(cwd) = &working_directory {\n    ensure!(cwd.is_dir(), \"working directory does not exist: {}\", cwd.display());\n}\nlet program_path = which::which(program)?; // resolves via PATH, fails fast with a clear error\nensure!(program_path.executable(), \"no exec permission on {}\", program_path.display());","typeGuard":null,"tryCatchPattern":"match terminal_result {\n    Err(TerminalError { directory, program, source, .. }) => {\n        // Compose a toast from the fields: directory, program, and the OS error text.\n        show_toast(format!(\"{}: {directory:?} {} {source}\",\n            \"failed to start shell\", program.clone().unwrap_or_default()));\n    }\n    Ok(terminal) => { /* ... */ }\n}","preventionTips":["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)"],"tags":["terminal","subprocess","spawn","io-error"],"backgroundTag":"process-spawn-failure","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"}