Skip to content

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

fix(modules): skip storage callback reload when module already ready

Steven Enamakel983cde3335b5
diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rs
index e112a92395..e888e5840e 100644
--- a/crates/openhuman-core/src/modules/ops.rs
+++ b/crates/openhuman-core/src/modules/ops.rs
@@ -242,6 +242,11 @@ async fn ensure_loaded_with_storage_callback(
) -> Result<(), String> {
let mut loads = STORAGE_CALLBACK_LOADS.lock().await;
if let Some((binding, _served)) = loads.get(id) {
+ // The first load consumed this binding; the module is process-wide, so
+ // every later workspace's client finds it already serving.
+ if matches!(resolver.state_of(id), Availability::Ready) {
+ return Ok(());
+ }
let mut module_config = module_config(config, id);
module_config["storage_callback"] = serde_json::json!(binding.unique_name().as_str());
return resolver