Skip to content

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

refactor(subagent_host): reorder checkpoint host extraction

Steven Enamakel9475b2a16e04
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 11cc19caec..d6c36fb319 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
@@ -296,6 +296,12 @@ impl OpenHumanPersistence {
fn checkpoint_from_persisted_pause(
persisted: tinyagents_orchestration::subagent::PersistedSubagentPause,
) -> Result<SubagentCheckpointData, SubagentError> {
+ let host = persisted
+ .outcome
+ .extensions
+ .get("openhuman_checkpoint")
+ .cloned()
+ .unwrap_or_default();
let outcome = persisted.outcome;
let paused = match &outcome.status {
SubagentOutcomeKind::AwaitingInput(paused) => paused.clone(),
@@ -306,12 +312,6 @@ impl OpenHumanPersistence {
}
};
let metadata = paused.resume.metadata;
- let host = persisted
- .outcome
- .extensions
- .get("openhuman_checkpoint")
- .cloned()
- .unwrap_or_default();
let host_string = |name: &str| {
host.get(name)
.and_then(serde_json::Value::as_str)