Skip to content

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

fix(memory): enter dispatch context in blocking memory tool calls

Steven Enamakel9c434eaa331b
diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rs
index f524cf431d..71cfb6e569 100644
--- a/crates/openhuman-core/src/memory/tools.rs
+++ b/crates/openhuman-core/src/memory/tools.rs
@@ -195,9 +195,10 @@ impl MemoryTool {
};
let outcome = if is_write_action(&args) {
let runtime = tokio::runtime::Handle::current();
- match dispatch
- .spawn_blocking(move || runtime.block_on(call))
- .await
+ match tokio::task::spawn_blocking(move || {
+ runtime.block_on(dispatch.enter(call))
+ })
+ .await
{
Ok(result) => result,
Err(_) => {