Skip to content

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

fix(storage): resolve ambient context before workspace lookup

Steven Enamakel6a0b7813c935
diff --git a/crates/openhuman-core/src/modules/storage_host.rs b/crates/openhuman-core/src/modules/storage_host.rs
index 12440c6501..23df15a2cf 100644
--- a/crates/openhuman-core/src/modules/storage_host.rs
+++ b/crates/openhuman-core/src/modules/storage_host.rs
@@ -601,13 +601,14 @@ impl Environment for Live {
fn backend(&self) -> Option<Arc<dyn StorageBackend>> {
// A host that installed a backend (the app, or an embedder that passed
// one) wins. An embedder that did not gets the workspace default every
- // other store already opens for itself ([`crate::storage::backend_for`]),
+ // other store already opens for itself ([`crate::storage::local::backend_for`]),
// so a module is not the one consumer left with no storage.
crate::storage::installed().or_else(|| {
let workspace = crate::core::runtime::DispatchCtx::ambient()
+ .resolved()?
.workspace_dir()
.ok()?;
- crate::storage::backend_for(&workspace).ok()
+ crate::storage::local::backend_for(&workspace).ok()
})
}