{"record":{"id":"a6ae63f6d8bfa2b2","repo":"tinyhumansai/openhuman","slug":"unknown-workflow-run-id","errorCode":null,"errorMessage":"unknown workflow run: {id}","messagePattern":"unknown workflow run: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/orchestration/workflow_runs/engine.rs","lineNumber":293,"sourceCode":"    )\n    .context(\"persist workflow run interrupt\")?;\n\n    log::debug!(target: LOG_TARGET, \"[workflow_run_engine] stop.marked_interrupted run={id}\");\n    Ok(Some(updated))\n}\n\n/// Resume an interrupted (or otherwise incomplete) workflow run.\n///\n/// Reloads the run, clears any stale cancellation flag, flips the row back to\n/// `Running`, and spawns a fresh engine loop. Phases already `completed` in\n/// `phase_states` are skipped; the loop continues from the first incomplete\n/// phase whose dependencies are satisfied. Returns the run row (now `Running`),\n/// or an error if the run is unknown / already terminal-complete / its\n/// definition no longer exists.\npub async fn resume_workflow_run(config: &Config, id: &str) -> Result<WorkflowRun> {\n    log::debug!(target: LOG_TARGET, \"[workflow_run_engine] resume.entry run={id}\");\n    let run = get_workflow_run(&config.workspace_dir, id)?\n        .ok_or_else(|| anyhow!(\"unknown workflow run: {id}\"))?;\n\n    if matches!(run.status, WorkflowRunStatus::Completed) {\n        return Err(anyhow!(\"workflow run {id} is already completed\"));\n    }\n\n    let definition = definition_by_id(&run.definition_id)\n        .ok_or_else(|| anyhow!(\"definition {} no longer exists\", run.definition_id))?;\n\n    // Clear any prior cancellation intent and re-register a fresh flag.\n    clear_cancel_flag(id);\n    register_cancel_flag(id);\n\n    let resumed = upsert_workflow_run(\n        &config.workspace_dir,\n        WorkflowRunUpsert {\n            id: run.id.clone(),\n            definition_id: run.definition_id.clone(),\n            parent_thread_id: run.parent_thread_id.clone(),","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/orchestration/workflow_runs/engine.rs#L275-L311","documentation":"resume_workflow_run (or stop path) reloaded a run id from the ledger and found nothing — the run row does not exist in this workspace. Faulting input is the id: deleted run, different workspace_dir, or a stale id held by the UI/orchestrator after a ledger reset.","triggerScenarios":"Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List workflow runs to confirm existing ids and re-issue","Verify the workspace_dir matches where the run was created","Restart the workflow from its definition if the old run is gone"],"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"}