zed-industries/zed · error · ValueError
could not locate run
Error message
could not locate run '{run_id}' in the local run index ({run_index.index_path()}). Pass --experiment-name (and --namespace if it isn't yours). The index is written automatically when you launch a run from this machine. What it means
Zed's cloud web-search provider bails with the raw HTTP status and response body whenever the search endpoint answers with a non-2xx status. The body is included verbatim because it usually names the real cause: invalid or expired credentials, rate limiting/quota, or an upstream outage.
Solutions
- Read the Status and Body in the message: 401/403 → re-enter or refresh the API key/provider sign-in; 429 → wait for the quota window to reset; 5xx → retry later
- Verify the web-search provider settings and credentials in Zed settings
- For 429/5xx, retry with backoff instead of hammering the endpoint
Example fix
// before
let results = search(query).await?; // non-2xx bubbles as one opaque string
// after
let results = match search(query).await {
Ok(results) => results,
Err(err) if err.to_string().contains("Status: 429") => {
backoff_delay().await;
search(query).await?
}
Err(err) => return Err(err),
}; Defensive patterns
Strategy: retry
Validate before calling
// Ensure credentials exist before searching:
if !provider_has_api_key_configured(cx) {
return Err(anyhow!("configure the web search API key before searching"));
} Try / catch
let mut attempt = 0;
loop {
match search(&query).await {
Ok(results) => break Ok(results),
Err(err) if attempt < 3 && err.to_string().contains("Status: 429") => {
exponential_backoff(attempt).await; // honor rate limits
attempt += 1;
}
Err(err) if err.to_string().contains("Status: 40") => break Err(err), // auth: do not retry
Err(err) => break Err(err),
}
} Prevention
- Retry only 429/5xx with backoff; never retry 401/403 — fix the key instead
- Log the response body once per failure; it names the quota or credential problem
- Cache recent results to stay under tight quotas during interactive sessions
When it happens
Trigger: response.status().is_success() is false after POSTing the search request: 401/403 for a bad or missing API key, 429 for rate limit or exhausted quota, 5xx for a provider outage; a proxy intercepting the request can also produce an unexpected status.
Common situations: Subscription or trial lapsed so the key stops working; free-tier quota exhausted mid-session; regional blocking; scheduled provider maintenance windows.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Baseten API returned
- Failed to connect to API
- Failed to connect to API
- status error , response
- custom server error
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/3a1ef362ead374f2.
Report an issue: GitHub.
Appendix: source
Thrown at crates/eval_cli/zed_eval/common.py:208
When `--experiment-name` is given, behaves exactly as before: namespace comes
from `--namespace` or the local git default. When it is omitted, the run is
located via the launch-time local run index (`run_index`) so a bare run id is
enough. Raises a friendly error pointing at the explicit flags when the run
can't be found.
"""
from . import run_index
explicit_experiment = getattr(args, "experiment_name", None)
explicit_namespace = getattr(args, "namespace", None)
if explicit_experiment:
namespace = explicit_namespace or source.default_namespace()
return (
source.sanitize_namespace(namespace),
source.sanitize_namespace(explicit_experiment),
)
entry = run_index.lookup(run_id)
if not entry:
raise ValueError(
f"could not locate run '{run_id}' in the local run index "
f"({run_index.index_path()}). Pass --experiment-name (and "
"--namespace if it isn't yours). The index is written automatically "
"when you launch a run from this machine."
)
namespace = (
explicit_namespace or entry.get("namespace") or source.default_namespace()
)
return (
source.sanitize_namespace(namespace),
source.sanitize_namespace(entry["experiment_name"]),
)
View on GitHub (pinned to f4178619ac)