Skip to content

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

test(orchestration): match resumed job by task id extension

Steven Enamakel0f80a9eb6426
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
index bb09ec455a..d67b866e9c 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
@@ -95,7 +95,12 @@ async fn spawn_subagent_with_same_task_key_resumes_paused_job_through_shared_dri
let running_job = jobs
.list()
.into_iter()
- .find(|job| job.id.as_str() == task_id)
+ .find(|job| {
+ job.extensions
+ .get("task_id")
+ .and_then(serde_json::Value::as_str)
+ == Some(task_id.as_str())
+ })
.expect("initial child is registered in shared Jobs");
let paused_job = tokio::time::timeout(
std::time::Duration::from_secs(5),