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 task id and iteration count in host outcome

Steven Enamakela4ef531097f9
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 cc50e2a4f3..9806d7f836 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
@@ -13,6 +13,8 @@ pub(super) fn host_outcome_to_neutral(
let usage_cost = outcome.usage.cost();
let mut extensions = std::collections::BTreeMap::from_iter([
("agent_id".into(), serde_json::json!(definition.id)),
+ ("task_id".into(), serde_json::json!(&outcome.task_id)),
+ ("iterations".into(), serde_json::json!(outcome.iterations)),
(
"tier".into(),
serde_json::json!(definition.agent_tier.as_str()),