Skip to content

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

test(orchestration): update subagent e2e test for run context

Steven Enamakelf6ada8edb6c9
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index 2b6950ad15..71ff221d67 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -59,17 +59,22 @@ async fn spawn_subagent_reports_a_stopped_child_as_a_failed_tool_result() {
let _ = AgentDefinitionRegistry::init_global_builtins();
let workspace = tempfile::TempDir::new().expect("workspace");
let (progress_tx, mut progress_rx) = tokio::sync::mpsc::channel(512);
- let mut parent = parent_context(workspace.path(), Arc::new(LoopingToolModel), vec![]);
- parent.on_progress = Some(progress_tx);
+ let parent = parent_context(workspace.path(), Arc::new(LoopingToolModel), vec![]);
+ let mut run_context = crate::agent::tinyagents::host::OpenHumanRunContext::new();
+ run_context.progress = Some(progress_tx);
let result = with_parent_context(parent, async {
SpawnSubagentTool::new()
- .execute(json!({
- "agent_id": "task_manager_agent",
- "prompt": "List the task sources",
- "model": "test-model",
- "blocking": true
- }))
+ .execute_with_parent_context(
+ json!({
+ "agent_id": "task_manager_agent",
+ "prompt": "List the task sources",
+ "model": "test-model",
+ "blocking": true
+ }),
+ None,
+ run_context,
+ )
.await
})
.await