The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: pass parent context via run options instead of ambient state
Steven Enamakeld391f76a8426
diff --git a/tests/composio_list_tools_stack_overflow_regression.rs b/tests/composio_list_tools_stack_overflow_regression.rsindex 1dba34f2cb..6498f9bed0 100644--- a/tests/composio_list_tools_stack_overflow_regression.rs+++ b/tests/composio_list_tools_stack_overflow_regression.rs@@ -109,7 +109,7 @@use async_trait::async_trait;use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;-use openhuman_core::agent::harness::{with_parent_context, ParentExecutionContext};+use openhuman_core::agent::harness::ParentExecutionContext;use openhuman_core::agent::subagent_host::{run_subagent, SubagentRunOptions};use openhuman_core::config::AgentConfig;use parking_lot::Mutex;@@ -351,13 +351,8 @@ async fn drive_subagent() {// stack the cargo-test process aborts (SIGABRT / SIGBUS) and no// test report is emitted. We don't care whether the sub-agent// semantically "succeeded" — only that the runtime did not abort.- let _ = with_parent_context(parent, async move {- run_subagent(- &def,- "list available gmail actions",- SubagentRunOptions::default(),- )- .await- })- .await;+ // The parent is an explicit value on the run options, not ambient state.+ let mut options = SubagentRunOptions::default();+ options.run_context.parent = Some(parent);+ let _ = run_subagent(&def, "list available gmail actions", options).await;}diff --git a/tests/in_process/calendar_grounding_e2e.rs b/tests/in_process/calendar_grounding_e2e.rsindex 2b42630a01..a99e641b77 100644--- a/tests/in_process/calendar_grounding_e2e.rs+++ b/tests/in_process/calendar_grounding_e2e.rs@@ -212,15 +212,15 @@ async fn test_subagent_has_current_date_context() -> Result<()> {// `subagent_runner::ops::tests::resolve_subagent_provider_*`.def.model = tinyagents_definition::ModelSpec::Inherit;- let _ = openhuman_core::agent::harness::with_parent_context(parent, async {- openhuman_core::agent::subagent_host::run_subagent(- &def,- "list my calendar events for today",- openhuman_core::agent::subagent_host::SubagentRunOptions::default(),- )- .await- })- .await?;+ // The parent is an explicit value on the run options, not ambient state.+ let mut options = openhuman_core::agent::subagent_host::SubagentRunOptions::default();+ options.run_context.parent = Some(parent);+ let _ = openhuman_core::agent::subagent_host::run_subagent(+ &def,+ "list my calendar events for today",+ options,+ )+ .await;let messages = captured_messages.lock();// Use substring search on all user messages