Skip to content

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

feat(subagent-host): expose failure cause in neutral outcome

Steven Enamakel6b3192f2ebb6
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
index f3ff8b8ccf..0d14e45659 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
@@ -28,6 +28,16 @@ pub(super) fn host_outcome_to_neutral(
serde_json::json!(outcome.artifact_paths),
),
]);
+ if let Some(cause) = &outcome.failure_cause {
+ extensions.insert(
+ "failure_cause".into(),
+ serde_json::json!({
+ "class": cause.class,
+ "operation": cause.operation,
+ "summary": cause.summary,
+ }),
+ );
+ }
let status = match outcome.status {
SubagentRunStatus::Completed => SubagentOutcomeKind::Completed,
SubagentRunStatus::AwaitingUser {