Skip to content

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

fix(subagent_host): resolve subagent runner and storage endpoint issues

Steven Enamakel8ae058400691
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index 047aadca93..b003d202d3 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -281,7 +281,9 @@ pub(crate) async fn run_subagent_direct(
// Loaded once per spawn (see `LoadedConfig`), after the tier gate so a
// rejected spawn never initialises config on first run.
- let loaded_config: LoadedConfig = Box::pin(crate::config::ops::load_current_or_init_ambient())
+ let loaded_config: LoadedConfig = Box::pin(crate::config::ops::load_current_or_init(
+ &options.run_context.dispatch_ctx(),
+ ))
.await
.map(std::sync::Arc::new)
.map_err(|e| e.to_string());
diff --git a/crates/openhuman-core/src/mcp/server/module.rs b/crates/openhuman-core/src/mcp/server/module.rs
index 2b5124f220..3a5553bce6 100644
--- a/crates/openhuman-core/src/mcp/server/module.rs
+++ b/crates/openhuman-core/src/mcp/server/module.rs
@@ -411,7 +411,9 @@ impl ServerSession {
{
*pending = Some(PendingCallback::Running {
id: callback_id.clone(),
- task: crate::core::runtime::DispatchCtx::ambient()
+ // The host callback runs under the process default, like
+ // `host_dispatch`: the MCP server is a single-tenant host.
+ task: crate::core::runtime::DispatchCtx::process_default()
.spawn((self.callback_dispatch)(call)),
});
}
diff --git a/crates/openhuman-core/src/modules/storage_host_endpoint.rs b/crates/openhuman-core/src/modules/storage_host_endpoint.rs
index e49bcae7d2..9b6bcac930 100644
--- a/crates/openhuman-core/src/modules/storage_host_endpoint.rs
+++ b/crates/openhuman-core/src/modules/storage_host_endpoint.rs
@@ -103,7 +103,9 @@ impl StorageHost {
let tx = relay.tx.clone();
relay.fed_by = Some(Arc::downgrade(binding));
relay.bridge = Some(
- crate::core::runtime::DispatchCtx::ambient().spawn(async move {
+ // The forwarder only moves signals between channels and reads no
+ // scope, so it needs no tenant.
+ crate::core::runtime::DispatchCtx::host_default().spawn(async move {
loop {
match signals.recv().await {
Ok(signal) => {