Skip to content

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

fix(subagent_host): preserve existing checkpoint extension on pause save

Steven Enamakel862621b8f04e
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 f0cdc14319..11cc19caec 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs
@@ -628,14 +628,16 @@ impl tinyagents_orchestration::subagent::SubagentPersistence for OpenHumanPersis
.unwrap_or_default();
// Product checkpoint fields absent from the neutral pause stay in a
// namespaced extension; reserved TinyAgents fields remain untouched.
- pause.outcome.extensions.insert(
- "openhuman_checkpoint".into(),
- serde_json::json!({
- "created_at": chrono::Utc::now().to_rfc3339(),
- "options": pause.outcome.extensions.get("options"),
- "elapsed_ms": elapsed_ms,
- }),
- );
+ let host_checkpoint = serde_json::json!({
+ "created_at": chrono::Utc::now().to_rfc3339(),
+ "options": pause.outcome.extensions.get("options"),
+ "elapsed_ms": elapsed_ms,
+ });
+ pause
+ .outcome
+ .extensions
+ .entry("openhuman_checkpoint".into())
+ .or_insert(host_checkpoint);
let disposition = tinyagents_orchestration::subagent::SubagentPersistence::save_pause(
&self.file_store,
pause.clone(),