Skip to content

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

fix(config): use ambient config loader for subagent spawns

Steven Enamakel6b8527fe1e54
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 24c6d82ed9..efe718de91 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,7 @@ 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())
+ let loaded_config: LoadedConfig = Box::pin(crate::config::ops::load_current_or_init_ambient())
.await
.map(std::sync::Arc::new)
.map_err(|e| e.to_string());
diff --git a/crates/openhuman-core/src/config/ops/loader.rs b/crates/openhuman-core/src/config/ops/loader.rs
index 04d031f277..2ee213a25c 100644
--- a/crates/openhuman-core/src/config/ops/loader.rs
+++ b/crates/openhuman-core/src/config/ops/loader.rs
@@ -8,7 +8,8 @@ mod snapshot;
pub use load::{
load_config_for_workspace_with_timeout, load_config_in, load_config_with_timeout,
- load_current_or_init, reload_config_from_paths, reload_config_snapshot_with_timeout,
+ load_current_or_init, load_current_or_init_ambient, reload_config_from_paths,
+ reload_config_snapshot_with_timeout,
};
pub(crate) use paths::fallback_workspace_dir;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/config/ops/mod.rs b/crates/openhuman-core/src/config/ops/mod.rs
index 304ecbed82..88a9368eb2 100644
--- a/crates/openhuman-core/src/config/ops/mod.rs
+++ b/crates/openhuman-core/src/config/ops/mod.rs
@@ -25,8 +25,9 @@ pub use loader::{
get_dashboard_settings, get_data_paths, get_data_paths_for_user, get_runtime_flags,
load_and_get_client_config_snapshot, load_and_get_config_snapshot,
load_config_for_workspace_with_timeout, load_config_in, load_config_with_timeout,
- load_current_or_init, reload_config_from_paths, reload_config_snapshot_with_timeout,
- reset_local_data, set_browser_allow_all, snapshot_config_json, RuntimeFlagsOut,
+ load_current_or_init, load_current_or_init_ambient, reload_config_from_paths,
+ reload_config_snapshot_with_timeout, reset_local_data, set_browser_allow_all,
+ snapshot_config_json, RuntimeFlagsOut,
};
// expose internal helpers needed by tests (ops_tests.rs uses super::*)
#[cfg(test)]