Skip to content

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

fix(web_chat): scope thread and request ids in parallel turn state

Steven Enamakel39e4b46fb771
diff --git a/crates/openhuman-core/src/web_chat/ops/state.rs b/crates/openhuman-core/src/web_chat/ops/state.rs
index 4f325984bc..7cc6a72bec 100644
--- a/crates/openhuman-core/src/web_chat/ops/state.rs
+++ b/crates/openhuman-core/src/web_chat/ops/state.rs
@@ -170,7 +170,7 @@ pub(crate) async fn live_thread_ids() -> Vec<String> {
.lock_owned()
.await
.values()
- .map(|entry| entry.thread_id.clone()),
+ .map(|entry| unscope(&entry.thread_id)),
);
threads.sort();
threads.dedup();
@@ -188,9 +188,9 @@ pub(crate) async fn track_parallel_turn_for_test(
let watched = cancel.clone();
let handle = crate::core::runtime::spawn_scoped(async move { watched.cancelled().await });
parallel_in_flight().lock_owned().await.insert(
- request_id.to_string(),
+ key_for(request_id),
ParallelEntry {
- thread_id: thread_id.to_string(),
+ thread_id: key_for(thread_id),
handle,
cancel_token: cancel,
},