{"record":{"id":"282e82a0bbd54dd3","repo":"tinyhumansai/openhuman","slug":"unknown-workflow-definition-definition-id","errorCode":null,"errorMessage":"unknown workflow definition: {definition_id}","messagePattern":"unknown workflow definition: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/orchestration/workflow_runs/engine.rs","lineNumber":166,"sourceCode":"/// Start a new workflow run and return immediately.\n///\n/// Resolves `definition_id` to a builtin [`WorkflowDefinition`], creates a\n/// `Running` ledger row with `phase_states` initialised to one `pending` entry\n/// per phase, persists it, then `tokio::spawn`s the engine loop. The returned\n/// [`WorkflowRun`] is the freshly-created row (status `Running`); callers poll\n/// `workflow_run_get` to observe progress.\npub async fn start_workflow_run(\n    config: &Config,\n    definition_id: &str,\n    input: Value,\n    parent_thread_id: Option<String>,\n) -> Result<WorkflowRun> {\n    log::debug!(\n        target: LOG_TARGET,\n        \"[workflow_run_engine] start.entry definition={definition_id} parent_thread={parent_thread_id:?}\"\n    );\n    let definition = definition_by_id(definition_id)\n        .ok_or_else(|| anyhow!(\"unknown workflow definition: {definition_id}\"))?;\n\n    let run_id = format!(\"wfrun-{}\", uuid::Uuid::new_v4());\n    let phase_states = init_phase_states(&definition);\n\n    let run = upsert_workflow_run(\n        &config.workspace_dir,\n        WorkflowRunUpsert {\n            id: run_id.clone(),\n            definition_id: definition.id.clone(),\n            parent_thread_id,\n            input: input.clone(),\n            phase_states,\n            child_run_ids: Vec::new(),\n            status: WorkflowRunStatus::Running,\n            summary: None,\n            started_at: None,\n            completed_at: None,\n        },","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/orchestration/workflow_runs/engine.rs#L148-L184","documentation":"start_workflow_run could not resolve definition_id to any registered builtin WorkflowDefinition. The definition registry is fixed at build/config time; the faulting input is the definition id — unknown, renamed, or a workflow whose registration is gated off. Fails before any ledger row is created, so no run exists.","triggerScenarios":"Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List registered workflow definitions and use a valid id","If the workflow was renamed/removed, update the caller to a current definition id","For custom workflows, register the definition before starting a run"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}