{"record":{"id":"fa0ac758eea90ee4","repo":"NousResearch/hermes-agent","slug":"job-name-ref-is-ambiguous-matches-len-match","errorCode":null,"errorMessage":"Job name '{ref}' is ambiguous — matches {len(matches)} jobs: {ids}. Use the job ID instead.","messagePattern":"Job name '(.+?)' is ambiguous — matches (.+?) jobs: (.+?)\\. Use the job ID instead\\.","errorType":"validation","errorClass":"AmbiguousJobReference","httpStatus":null,"severity":"error","filePath":"cron/jobs.py","lineNumber":1836,"sourceCode":"    \"\"\"Resolve a job reference (ID or name) to a job record.\n\n    - Exact ID match wins (works even if a different job's name equals this ID).\n    - Otherwise, case-insensitive name match.\n    - If a name matches more than one job, raises AmbiguousJobReference so the\n      caller can surface the matching IDs rather than silently picking one.\n    \"\"\"\n    if not ref:\n        return None\n    jobs = load_jobs()\n    for job in jobs:\n        if job[\"id\"] == ref:\n            return _normalize_job_record(job)\n    ref_lower = ref.lower()\n    name_matches = [j for j in jobs if (j.get(\"name\") or \"\").lower() == ref_lower]\n    if not name_matches:\n        return None\n    if len(name_matches) > 1:\n        raise AmbiguousJobReference(\n            ref, [_normalize_job_record(j) for j in name_matches]\n        )\n    return _normalize_job_record(name_matches[0])\n\n\ndef list_jobs(include_disabled: bool = False) -> List[Dict[str, Any]]:\n    \"\"\"List all jobs, optionally including disabled ones.\"\"\"\n    jobs = [_normalize_job_record(j) for j in load_jobs()]\n    if not include_disabled:\n        jobs = [j for j in jobs if j.get(\"enabled\", True)]\n    try:\n        from cron.executions import latest_executions\n\n        latest = latest_executions([job.get(\"id\", \"\") for job in jobs])\n    except Exception:\n        latest = {}\n    for job in jobs:\n        job[\"latest_execution\"] = latest.get(job.get(\"id\", \"\"))","sourceCodeStart":1818,"sourceCodeEnd":1854,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/jobs.py#L1818-L1854","documentation":"Error \"Job name '{ref}' is ambiguous — matches {len(matches)} jobs: {ids}. Use the job ID instead.\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at cron/jobs.py:1836 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the job ID instead of the ambiguous name.","Rename jobs so names are unique."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}