Skip to content

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

fix(modules): log the reason a module fails to load

Steven Enamakel92ce90d96834
diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rs
index e112a92395..e682ed9bca 100644
--- a/crates/openhuman-core/src/modules/ops.rs
+++ b/crates/openhuman-core/src/modules/ops.rs
@@ -287,11 +287,17 @@ impl ModuleAccess for CallbackAccess {
fn ensure_loaded<'a>(&'a self, id: &'a str) -> AccessFuture<'a, Result<(), String>> {
Box::pin(async move {
- if needs_storage_callback(id) {
+ let loaded = if needs_storage_callback(id) {
ensure_loaded(&self.config, id).await
} else {
self.resolver.ensure_loaded(id).await
+ };
+ // The client collapses this message into a bare "module
+ // unavailable"; keep the reason where an operator can grep it.
+ if let Err(error) = &loaded {
+ tracing::warn!(module = id, %error, "[modules] ensure_loaded refused the module");
}
+ loaded
})
}