Skip to content

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

feat(subagent): carry classified failure cause on run outcome

Steven Enamakel2d20ffa991cc
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index 2042207adb..5ea0d58ab4 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -792,7 +792,15 @@ async fn run_typed_mode(
);
}
- let (output, iterations, agg_usage, early_exit_tool, hit_cap, breaker_halt) =
+ let (
+ output,
+ iterations,
+ agg_usage,
+ early_exit_tool,
+ hit_cap,
+ breaker_halt,
+ failure_cause,
+ ) =
super::graph::run_subagent_via_graph(
subagent_source.clone(),
&model,
@@ -911,6 +919,7 @@ async fn run_typed_mode(
elapsed: started.elapsed(),
mode: SubagentMode::Typed,
status,
+ failure_cause,
final_history: history,
usage,
// Filled in by `run_subagent` once the offload step has had its say, so
diff --git a/crates/openhuman-core/src/agent/subagent_host/types.rs b/crates/openhuman-core/src/agent/subagent_host/types.rs
index 021cb68c8c..95d8c3c2e5 100644
--- a/crates/openhuman-core/src/agent/subagent_host/types.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/types.rs
@@ -151,6 +151,9 @@ pub struct SubagentRunOutcome {
pub output: String,
/// How many LLM round-trips were performed during the run.
pub iterations: usize,
+ /// Typed failure cause for a classified terminal halt. Kept alongside the
+ /// display status so later projections preserve class and operation.
+ pub failure_cause: Option<tinyagents_harness::no_progress::ClassifiedStopCause>,
/// Total wall-clock duration of the run.
pub elapsed: Duration,
/// Which execution mode was used (Typed vs. Fork).