Skip to content

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

test(orchestration): pass tool execution context in subagent continuation test

Steven Enamakelbd749407978b
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
index 995eb5f915..d07b69a327 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs
@@ -426,6 +426,10 @@ async fn spawn_subagent_reuses_idle_task_key_with_the_saved_history() {
.with_policy_id("idle-roster-policy");
live.workspace = Some(workspace_descriptor.clone());
assert!(live.data.dispatch_ctx().resolved().is_some());
+ let tool_context = tinyagents_harness::tool::ToolExecutionContext::from_run_context(
+ &live,
+ tinyagents_harness::ids::CallId::new("idle-roster-spawn"),
+ );
let tool = SpawnSubagentTool::new();
let first = tool
.execute_with_live_parent_context(
@@ -435,7 +439,7 @@ async fn spawn_subagent_reuses_idle_task_key_with_the_saved_history() {
"model": "test-model",
"task_key": "idle-history-fixture"
}),
- None,
+ Some(&tool_context),
live.data.child(),
crate::agent::subagent_host::detached_subagent_parent(&live, "idle-reuse-child")
.expect("detached parent"),
@@ -524,7 +528,7 @@ async fn spawn_subagent_reuses_idle_task_key_with_the_saved_history() {
"model": "test-model",
"task_key": "idle-history-fixture"
}),
- None,
+ Some(&tool_context),
live.data.child(),
crate::agent::subagent_host::detached_subagent_parent(&live, "idle-reuse-child")
.expect("detached parent"),