Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/flows/ops/resume.rs

Steven Enamakelcc9ed97dacab
diff --git a/crates/openhuman-core/src/flows/ops/resume.rs b/crates/openhuman-core/src/flows/ops/resume.rs
index aa634fed79..05b10253b2 100644
--- a/crates/openhuman-core/src/flows/ops/resume.rs
+++ b/crates/openhuman-core/src/flows/ops/resume.rs
@@ -222,7 +222,8 @@ pub async fn flows_resume(
// Register BEFORE the status flip for the same reason `flows_run` registers
// before inserting its row: never let a cancel observe a live-looking row
// that no registered run owns.
- let (cancel_token, _run_guard) = run_registry::register(thread_id);
+ let (cancel_token, _run_guard) = run_registry::try_register(thread_id)
+ .ok_or_else(|| format!("flow run '{thread_id}' already has an in-flight resume"))?;
match store::mark_run_resuming(config, thread_id) {
Ok(true) => {}
Ok(false) => {