{"record":{"id":"3a1ef362ead374f2","repo":"zed-industries/zed","slug":"could-not-locate-run-run-id-in-the-local-run-i","errorCode":null,"errorMessage":"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.","messagePattern":"could not locate run '(.+?)' in the local run index \\((.+?)\\)\\. Pass --experiment-name \\(and --namespace if it isn't yours\\)\\. The index is written automatically when you launch a run from this machine\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"crates/eval_cli/zed_eval/common.py","lineNumber":208,"sourceCode":"    When `--experiment-name` is given, behaves exactly as before: namespace comes\n    from `--namespace` or the local git default. When it is omitted, the run is\n    located via the launch-time local run index (`run_index`) so a bare run id is\n    enough. Raises a friendly error pointing at the explicit flags when the run\n    can't be found.\n    \"\"\"\n    from . import run_index\n\n    explicit_experiment = getattr(args, \"experiment_name\", None)\n    explicit_namespace = getattr(args, \"namespace\", None)\n    if explicit_experiment:\n        namespace = explicit_namespace or source.default_namespace()\n        return (\n            source.sanitize_namespace(namespace),\n            source.sanitize_namespace(explicit_experiment),\n        )\n    entry = run_index.lookup(run_id)\n    if not entry:\n        raise ValueError(\n            f\"could not locate run '{run_id}' in the local run index \"\n            f\"({run_index.index_path()}). Pass --experiment-name (and \"\n            \"--namespace if it isn't yours). The index is written automatically \"\n            \"when you launch a run from this machine.\"\n        )\n    namespace = (\n        explicit_namespace or entry.get(\"namespace\") or source.default_namespace()\n    )\n    return (\n        source.sanitize_namespace(namespace),\n        source.sanitize_namespace(entry[\"experiment_name\"]),\n    )\n","sourceCodeStart":190,"sourceCodeEnd":221,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/eval_cli/zed_eval/common.py#L190-L221","documentation":"When no --experiment-name is given, common.py resolves a run_id through the local run index (written automatically when runs are launched from this machine). The ValueError means run_index.lookup() returned nothing — the run started elsewhere, the index was cleared, or the entry lives under a different namespace — and the message names the two explicit flags that bypass the index, plus the index path it checked.","triggerScenarios":"Querying results for a run_id launched on a teammate's machine or in CI; a deleted or missing local index file; a truncated or typo'd run id; the entry existing but under a non-default namespace.","commonSituations":"Sharing run ids over chat to reproduce results; fresh checkouts or cleaned state directories; multi-namespace setups.","solutions":["Re-run with the flags the error suggests: `--experiment-name <name>` used at launch, plus `--namespace <owner>` if the run wasn't yours","Verify the run_id is complete — copy the full id, not a prefix","If index-based lookup matters, launch (or re-launch) the run from this machine so the index records it"],"exampleFix":"# before\nzed-eval results <run_id>   # ValueError: could not locate run\n\n# after\nzed-eval results <run_id> --experiment-name my-exp --namespace alice","handlingStrategy":"validation","validationCode":"from zed_eval import run_index\n\nif not run_index.lookup(run_id):\n    raise SystemExit(\"run not in local index — pass --experiment-name (and --namespace)\")","typeGuard":"from zed_eval import run_index\n\ndef run_is_indexed(run_id):\n    return run_index.lookup(run_id) is not None","tryCatchPattern":"try:\n    namespace, experiment = resolve_run_namespace_and_experiment(args, run_id)\nexcept ValueError as e:\n    print(e)  # names the index path and the explicit flags\n    raise SystemExit(2)","preventionTips":["Always pass --experiment-name in scripts instead of relying on the local index","Preserve the local run index when cleaning state directories","Share experiment-name and namespace alongside run ids"],"tags":["python","cli","index","configuration","runs"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}