Skip to content

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

fix(orchestration): finish driver task when no live subagent jobs remain

Steven Enamakel379e55620df6
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
index 4c1e52eb7c..3d1d697e12 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
@@ -386,6 +386,9 @@ pub(crate) async fn cancel_for_thread(
.into_iter()
.filter(|job| !job.status.is_terminal())
.collect::<Vec<_>>();
+ if live_jobs.is_empty() {
+ crate::agent::orchestration::completion_owners::finish_driver_task(ctx, &task_id);
+ }
for job in live_jobs {
match jobs.cancel_owned(job.id.as_str(), &owner_key) {
Ok(cancelled_job) => {