zed-industries/zed · error · ValueError

could not locate run '{args.run_id}' in the local run index

Error message

could not locate run '{args.run_id}' in the local run index ({run_index.index_path()}). Pass --experiment-name (and --namespace if it isn't yours).

What it means

Raised by launch.build_rejudge_request() when no --experiment-name was given and run_index.lookup(run_id) found nothing in the local launch index. The index (run_index.py) is a best-effort, machine-local JSON file at ~/.cache/agent-evals/run-index.json (honoring XDG_CACHE_HOME or $AGENT_EVALS_RUN_INDEX), capped at 500 entries, and only written by launches issued from that machine. The error tells you the exact path searched and the escape hatch: explicit --experiment-name / --namespace flags.

Source

Thrown at crates/eval_cli/zed_eval/launch.py:157

    return f"{source.sanitize_namespace(prefix)}-{utc_timestamp()}"


def build_rejudge_request(args: argparse.Namespace) -> dict[str, Any]:
    """Build the request for re-grading an existing run with a different judge.

    The positional `run_id` is the *parent* run; the derived run gets a new id
    under the same experiment so `report`/`list` group them together. Only the
    judge differs — no build, no agent model, no task selection.
    """
    judge_preset = args.judge
    config.get_judge(judge_preset)  # validate before spawning anything remote
    if getattr(args, "experiment_name", None):
        experiment_name = source.sanitize_namespace(args.experiment_name)
        namespace = default_namespace(args)
    else:
        entry = run_index.lookup(args.run_id)
        if not entry:
            raise ValueError(
                f"could not locate run '{args.run_id}' in the local run index "
                f"({run_index.index_path()}). Pass --experiment-name (and "
                "--namespace if it isn't yours)."
            )
        experiment_name = source.sanitize_namespace(entry["experiment_name"])
        namespace = source.sanitize_namespace(
            getattr(args, "namespace", None) or entry["namespace"]
        )
    parent_namespace = (
        source.sanitize_namespace(args.parent_namespace)
        if getattr(args, "parent_namespace", None)
        else namespace
    )
    parent_run_id = args.run_id
    judge_slug = source.sanitize_namespace(judge_preset)
    new_run_id = (
        args.new_run_id
        or f"{parent_run_id}-rejudge-{judge_slug}-{uuid.uuid4().hex[:6]}"

View on GitHub (pinned to bc538def45)

Solutions

  1. Pass --experiment-name (for benchmark runs this is the benchmark id, sanitized) and, if the run is not under your default namespace, --namespace: zed-eval rejudge <id> --experiment-name swe-atlas-rf --namespace jane.
  2. Double-check the run id with zed-eval list (recent runs from this machine) to rule out a typo.
  3. If the launch machine is reachable, re-run there, or point AGENT_EVALS_RUN_INDEX at a copy of that machine's run-index.json and retry.

Example fix

# before
zed-eval rejudge 20260101-ab12cd --judge kimi
# -> ValueError: could not locate run ... in the local run index ...

# after
zed-eval rejudge 20260101-ab12cd --judge kimi \
    --experiment-name swe-atlas-rf --namespace jane
Defensive patterns

Strategy: fallback

Validate before calling

from zed_eval import run_index

entry = run_index.lookup(args.run_id)
if entry is None and not getattr(args, "experiment_name", None):
    # fall back to explicit flags instead of letting the launch fail
    raise SystemExit(
        "run not in local index; pass --experiment-name (and --namespace)"
    )

Try / catch

try:
    rejudge_request = build_rejudge_request(args)
except ValueError as error:
    # error text names the index path; retry with explicit flags
    raise SystemExit(str(error))

Prevention

When it happens

Trigger: Running zed-eval rejudge <run-id> for a run launched from a different machine, CI, or another user account; the index entry was evicted because that machine has since recorded 500+ newer runs; $AGENT_EVALS_RUN_INDEX or $HOME points somewhere else in your current shell; a typo in the run id.

Common situations: Rejudging a teammate's run from your laptop; rejudging after a long gap during which many runs pushed the entry out of the 500-entry window; running inside containers/CI where the cache directory is ephemeral.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/58af26cf16e6893e. Report an issue: GitHub.