tinyhumansai/openhuman · error
definition no longer exists
Error message
definition {} no longer exists What it means
resume_workflow_run reloads the run's definition by id and it no longer resolves — the definition registry changed since the run was created (workflow removed, renamed, or its registration gate changed between versions). An interrupted run cannot be resumed against a definition that no longer describes its phase_states, so it fails rather than executing against a mismatched graph.
Solutions
- Restore/re-register the workflow definition this run was created from
- Start a fresh run of an available equivalent definition
- If the rename was intentional, provide a migration alias for the old definition id
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:300 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/efbef185f8860137.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/orchestration/workflow_runs/engine.rs:300
/// Resume an interrupted (or otherwise incomplete) workflow run.
///
/// Reloads the run, clears any stale cancellation flag, flips the row back to
/// `Running`, and spawns a fresh engine loop. Phases already `completed` in
/// `phase_states` are skipped; the loop continues from the first incomplete
/// phase whose dependencies are satisfied. Returns the run row (now `Running`),
/// or an error if the run is unknown / already terminal-complete / its
/// definition no longer exists.
pub async fn resume_workflow_run(config: &Config, id: &str) -> Result<WorkflowRun> {
log::debug!(target: LOG_TARGET, "[workflow_run_engine] resume.entry run={id}");
let run = get_workflow_run(&config.workspace_dir, id)?
.ok_or_else(|| anyhow!("unknown workflow run: {id}"))?;
if matches!(run.status, WorkflowRunStatus::Completed) {
return Err(anyhow!("workflow run {id} is already completed"));
}
let definition = definition_by_id(&run.definition_id)
.ok_or_else(|| anyhow!("definition {} no longer exists", run.definition_id))?;
// Clear any prior cancellation intent and re-register a fresh flag.
clear_cancel_flag(id);
register_cancel_flag(id);
let resumed = upsert_workflow_run(
&config.workspace_dir,
WorkflowRunUpsert {
id: run.id.clone(),
definition_id: run.definition_id.clone(),
parent_thread_id: run.parent_thread_id.clone(),
input: run.input.clone(),
phase_states: run.phase_states.clone(),
child_run_ids: run.child_run_ids.clone(),
status: WorkflowRunStatus::Running,
summary: run.summary.clone(),
started_at: Some(run.started_at),
completed_at: None,View on GitHub (pinned to 7491200858)