Skip to content

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

fix(subagent-host): read terminal outcome from file store first

Steven Enamakelcde1fee7d44c
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
index dd5812cbb6..496a773320 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
@@ -287,6 +287,21 @@ impl OpenHumanPersistence {
&self,
key: &SubagentTaskKey,
) -> Result<Option<(String, u64)>, SubagentError> {
+ if let Some(outcome) = self.file_store.terminal_outcome(key)? {
+ let agent_id = outcome
+ .extensions
+ .get("agent_id")
+ .and_then(serde_json::Value::as_str)
+ .unwrap_or_default();
+ if !agent_id.is_empty() {
+ let elapsed_ms = outcome
+ .extensions
+ .get("elapsed_ms")
+ .and_then(serde_json::Value::as_u64)
+ .unwrap_or_default();
+ return Ok(Some((agent_id.to_owned(), elapsed_ms)));
+ }
+ }
if let Some(record) = self.read_terminal_record(key)? {
return Ok(
(!record.agent_id.is_empty()).then_some((record.agent_id, record.elapsed_ms))
diff --git a/vendor/tinyagents b/vendor/tinyagents
index e1e65f0137..61a70ecc3d 160000
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@ -1 +1 @@
-Subproject commit e1e65f01379bd7d1d0f957ccc2caa5055e8f3fa8
+Subproject commit 61a70ecc3d170c3c93e389674b221780d7969400