{"record":{"id":"44581d155610ea7a","repo":"zeroclaw-labs/zeroclaw","slug":"ambiguous-name-id-or-name-matched-n-jobs","errorCode":null,"errorMessage":"Ambiguous name '{id_or_name}': matched {n} jobs — use the job ID instead","messagePattern":"Ambiguous name '(.+?)': matched (.+?) jobs — use the job ID instead","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/cron/store.rs","lineNumber":279,"sourceCode":"    agent_alias: &str,\n) -> Result<String> {\n    // Fast path: try exact ID lookup first.\n    if let Ok(job) = get_job(config, id_or_name) {\n        return Ok(job.id);\n    }\n\n    // Fallback: search by name within the requesting agent's own jobs.\n    let jobs = list_jobs_by_agent(config, agent_alias)?;\n    let lower = id_or_name.to_lowercase();\n    let matches: Vec<&CronJob> = jobs\n        .iter()\n        .filter(|j| j.name.as_deref().is_some_and(|n| n.to_lowercase() == lower))\n        .collect();\n\n    match matches.len() {\n        0 => anyhow::bail!(\"No cron job found with id or name '{id_or_name}'\"),\n        1 => Ok(matches[0].id.clone()),\n        n => anyhow::bail!(\n            \"Ambiguous name '{id_or_name}': matched {n} jobs — use the job ID instead\"\n        ),\n    }\n}\n\npub fn remove_job(config: &Config, id: &str) -> Result<()> {\n    let changed = with_initialized_connection(config, |conn| {\n        conn.execute(\"DELETE FROM cron_jobs WHERE id = ?1\", params![id])\n            .context(\"Failed to delete cron job\")\n    })?;\n\n    if changed == 0 {\n        anyhow::bail!(\"Cron job '{id}' not found\");\n    }\n\n    ::zeroclaw_log::record!(\n        INFO,\n        ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Delete)","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/cron/store.rs#L261-L297","documentation":"Error \"Ambiguous name '{id_or_name}': matched {n} jobs — use the job ID instead\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/cron/store.rs:279 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the unique job ID instead of the ambiguous name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}