Skip to content

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

test(spawn_async_subagent): cover failed steer of reused running session

Steven Enamakel560057a86459
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
index e08c1efbc1..72f4756ad6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
@@ -9,6 +9,13 @@ use tinyagents_harness::run_queue::RunQueue;
use tinytools::{ToolCallOptions, ToolRunContext};
use tinytools_agent::dialect::ToolCallFormat;
+#[test]
+fn failed_steer_of_running_reused_session_does_not_fall_through_to_spawn() {
+ let result = failed_running_reuse_steer_result("message queue is closed");
+ assert!(result.is_some(), "a failed reuse must return a tool error");
+ assert!(result.unwrap().is_error);
+}
+
struct ThreadContext(&'static str);
#[tokio::test]