Skip to content

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

refactor(subagent_host): route checkpoint resume through lifecycle module

Steven Enamakel84ffd384c06a
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
index e988634367..4cb59ca8c0 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -10,7 +10,7 @@
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
use crate::agent::subagent_host::{
- continue_subagent, continue_subagent_with_parent, continue_subagent_via_driver_tool,
+ continue_subagent, continue_subagent_via_driver_tool,
load_subagent_checkpoint, SubagentRunOptions, SubagentRunStatus,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 4f7ca585d2..5d897dc732 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -453,6 +453,10 @@ async fn invoke_async_spawn_driver_tool(
Ok((tool_result, bundle))
}
+pub(crate) fn checkpoint_resume(checkpoint: &super::SubagentCheckpointData) -> SubagentResume {
+ OpenHumanPersistence::checkpoint_resume(checkpoint)
+}
+
pub(super) fn decode_driver_job_result(
tool_result: tinytools::ToolResult,
bundle: &OpenHumanDriverBundle,
diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rs
index 6ec1c2c42b..b4fd843b50 100644
--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs
@@ -57,6 +57,7 @@ mod persisted_compat_tests;
// Public API — the entry point and the shapes it returns.
pub use autonomous::{definition_iter_cap, subagent_iter_cap_with_autonomous_lift};
pub(crate) use lifecycle::load_subagent_checkpoint;
+pub(crate) use lifecycle::{checkpoint_resume, continue_subagent_via_driver_tool};
pub(crate) use lifecycle::run_subagent_via_driver_tool;
#[cfg(test)]
pub(crate) use lifecycle::spawn_async_via_driver_tool_with_jobs;