Skip to content

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

refactor(memory): await write dispatch directly instead of blocking

Steven Enamakel6ba836b65f53
diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rs
index 49c1175544..8602285a2b 100644
--- a/crates/openhuman-core/src/memory/tools.rs
+++ b/crates/openhuman-core/src/memory/tools.rs
@@ -194,10 +194,9 @@ impl MemoryTool {
.await
};
let outcome = if is_write_action(&args) {
- let runtime = tokio::runtime::Handle::current();
let write_dispatch = dispatch.clone();
match write_dispatch
- .spawn_blocking(move || runtime.block_on(call))
+ .spawn(async move { call.await })
.await
{
Ok(result) => result,