Skip to content

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

fix(agent): resume continued subagents through the driver tool

Steven Enamakel1d0516c67f8f
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 dd3f9262ca..e988634367 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -10,8 +10,8 @@
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
use crate::agent::subagent_host::{
- continue_subagent, continue_subagent_with_parent, load_subagent_checkpoint, SubagentRunOptions,
- SubagentRunStatus,
+ continue_subagent, continue_subagent_with_parent, continue_subagent_via_driver_tool,
+ load_subagent_checkpoint, SubagentRunOptions, SubagentRunStatus,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::progress::AgentProgress;
@@ -355,6 +355,7 @@ impl ContinueSubagentTool {
let original_key = checkpoint.task_key.clone().ok_or_else(|| {
anyhow::anyhow!("continue_subagent: checkpoint omitted original task key")
})?;
+ let checkpoint_resume = crate::agent::subagent_host::checkpoint_resume(&checkpoint);
if checkpoint.agent_id != agent_id {
return Ok(ToolResult::error(format!(
@@ -457,14 +458,16 @@ impl ContinueSubagentTool {
// Run the sub-agent from its checkpoint
let continuation = if let Some(parent) = live_parent {
- continue_subagent_with_parent(
+ continue_subagent_via_driver_tool(
parent,
original_key,
definition.clone(),
message.clone(),
options,
+ checkpoint_resume,
)
.await
+ .map(|(outcome, _public_job_id)| outcome)
} else {
continue_subagent(original_key, definition, &message, options).await
};