Skip to content

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

fix(orchestration): propagate failure cause from continued subagents

Steven Enamakel33b2101121ce
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
index 76a9341f32..796b9f088a 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -553,7 +553,7 @@ impl ContinueSubagentTool {
}
Ok(ToolResult::success(outcome.output))
}
- SubagentRunStatus::Incomplete { reason } => {
+ SubagentRunStatus::Incomplete { reason, failure_cause } => {
// The continued sub-agent stopped short again (stuck halt
// / iteration cap). Hand back the partial progress framed
// as incomplete rather than a clean success (#4096).
@@ -591,7 +591,7 @@ impl ContinueSubagentTool {
worktree_path: None,
changed_files: Vec::new(),
dirty_status: None,
- stop: incomplete_stop(reason),
+ stop: incomplete_stop(reason, failure_cause.as_ref()),
})
.await;
}
@@ -613,6 +613,7 @@ impl ContinueSubagentTool {
&outcome.agent_id,
&outcome.task_id,
reason,
+ failure_cause.as_ref(),
envelope,
))
}