{"record":{"id":"2c431ce320a2577e","repo":"zed-industries/zed","slug":"no-run-id-given-and-the-local-run-index-is-empty","errorCode":null,"errorMessage":"no run id given and the local run index is empty. Launch a run first, or pass a run id explicitly.","messagePattern":"no run id given and the local run index is empty\\. Launch a run first, or pass a run id explicitly\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"crates/eval_cli/zed_eval/volume.py","lineNumber":146,"sourceCode":"    run_args = argparse.Namespace(**vars(args))\n    run_args.experiment_name = row[\"experiment_name\"]\n    run_args.run_id = row[\"run_id\"]\n    return run_args\n\n\ndef resolve_run_id(args: argparse.Namespace) -> str:\n    \"\"\"Return the run id to act on, defaulting to the most recent local run.\n\n    Commands like `status`/`logs` accept no run id at all, in which case we use\n    the most recently launched run recorded in the local index so a bare\n    `zed-eval status` answers \"how's my latest run doing?\".\n    \"\"\"\n    run_id = getattr(args, \"run_id\", None)\n    if run_id:\n        return run_id\n    entry = run_index.most_recent()\n    if not entry:\n        raise ValueError(\n            \"no run id given and the local run index is empty. Launch a run \"\n            \"first, or pass a run id explicitly.\"\n        )\n    args.run_id = entry[\"run_id\"]\n    print(\n        f\"(no run id given; using most recent: {entry['run_id']} / \"\n        f\"{entry.get('experiment_name')})\",\n        file=sys.stderr,\n    )\n    return entry[\"run_id\"]\n\n\ndef command_runs(args: argparse.Namespace) -> int:\n    entries = run_index.recent(args.limit)\n    if getattr(args, \"json\", False):\n        print_json(entries)\n        return 0\n    if not entries:","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/zed_eval/volume.py#L128-L164","documentation":"volume.py's resolve_run_id lets commands like `status` and `logs` omit a run id by defaulting to the most recent entry in the local run index (so a bare `zed-eval status` answers 'how is my latest run doing'). If no run id was given and run_index.most_recent() returns nothing — no run ever launched here — this ValueError is raised.","triggerScenarios":"A bare `zed-eval status` or `zed-eval logs` on a fresh install; the local index file deleted, pruned, or empty; running the query under a different $HOME than the launch used, so the index lives elsewhere.","commonSituations":"New machine or CI box with no run history; HOME changed between launch and query; cache-cleaning tools removing the index; index file corrupted into an empty document.","solutions":["Launch a run first (zed-eval launch ...), then retry the bare command","Or pass the run id explicitly: zed-eval status <run_id>","Check the index lives under the $HOME you launched with","Restore or regenerate the index if it was deleted but runs exist remotely"],"exampleFix":"# before\nzed-eval status   # ValueError: no run id given and the local run index is empty\n\n# after\nzed-eval launch --agent zed ...\nzed-eval status   # now defaults to the run just launched","handlingStrategy":"validation","validationCode":"run_id = getattr(args, \"run_id\", None)\nif not run_id and not run_index.most_recent():\n    raise SystemExit(\"no run in the local index; launch one first or pass a run id\")","typeGuard":null,"tryCatchPattern":"try:\n    run_id = resolve_run_id(args)\nexcept ValueError as err:\n    raise SystemExit(f\"usage: {err}\")","preventionTips":["Scripts should capture and reuse the run id printed at launch time","Keep $HOME stable between launch and status commands","Do not delete the local run index if you rely on bare status/logs commands"],"tags":["cli","run-index","usage","zed-eval"],"backgroundTag":"missing-required-argument","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"}