Skip to content

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

fix(subagent_host): handle cancellation flag outside tool result

Steven Enamakel2d90b322cd07
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index e910b01e30..d1c36f1ef7 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -1159,7 +1159,7 @@ impl SubagentExecutor<crate::agent::tinyagents::host::OpenHumanRunContext> for O
None => invoke.await,
};
match result {
- Ok((tool_result, cancelled)) => {
+ (Ok(tool_result), cancelled) => {
let output = tool_result.output();
let status = if cancelled {
SubagentRunStatus::Cancelled
@@ -1212,7 +1212,7 @@ impl SubagentExecutor<crate::agent::tinyagents::host::OpenHumanRunContext> for O
.insert(task_key, tool_result);
Ok(neutral)
}
- Err(error) => {
+ (Err(error), _) => {
self.failures
.lock()
.unwrap_or_else(|p| p.into_inner())