Skip to content

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

fix(web_chat): spawn parallel turn tracking on the scoped runtime

Steven Enamakelb3ebc6c6a7ca
diff --git a/crates/openhuman-core/src/web_chat/ops/state.rs b/crates/openhuman-core/src/web_chat/ops/state.rs
index c8381fa0cd..4f325984bc 100644
--- a/crates/openhuman-core/src/web_chat/ops/state.rs
+++ b/crates/openhuman-core/src/web_chat/ops/state.rs
@@ -186,7 +186,7 @@ pub(crate) async fn track_parallel_turn_for_test(
cancel: tokio_util::sync::CancellationToken,
) {
let watched = cancel.clone();
- let handle = tokio::spawn(async move { watched.cancelled().await });
+ let handle = crate::core::runtime::spawn_scoped(async move { watched.cancelled().await });
parallel_in_flight().lock_owned().await.insert(
request_id.to_string(),
ParallelEntry {