Skip to content

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

fix(subagent_host): include raw result in invalid job reference error

Steven Enamakel4b501ef5bdd8
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 257579fe9d..bd06f06ed4 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -190,9 +190,10 @@ pub(crate) async fn run_async_spawn_via_driver_tool(
)
.await
.map_err(|error| SubagentRunError::Provider(anyhow::anyhow!(error.to_string())))?;
- let reply: serde_json::Value = serde_json::from_str(&tool_result.output()).map_err(|error| {
+ let rendered_result = tool_result.output();
+ let reply: serde_json::Value = serde_json::from_str(&rendered_result).map_err(|error| {
SubagentRunError::Provider(anyhow::anyhow!(format!(
- "driver-backed async spawn returned an invalid job reference: {error}"
+ "driver-backed async spawn returned an invalid job reference: {error}; result={rendered_result}"
)))
})?;
let public_job_id = reply