Skip to content

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

refactor(subagent): route mark_failed through driver store

Steven Enamakelaef2bb69b576
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
index 8309a9325c..0df4bef138 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
@@ -384,12 +384,13 @@ impl SpawnSubagentTool {
.await
{
let message = error.to_string();
- let _ = subagent_sessions::mark_failed(
- &store,
+ let _ = driver_store
+ .mark_failed(
&resumed_session.subagent_session_id,
task_id,
message.clone(),
- );
+ )
+ .await;
completion_target
.failed(task_id, &definition.id, &message)
.await;
@@ -685,12 +686,14 @@ impl SpawnSubagentTool {
)
.await
{
- if let Err(store_err) = subagent_sessions::mark_failed(
- &store,
- &durable_session.subagent_session_id,
- &task_id,
- error.to_string(),
- ) {
+ if let Err(store_err) = driver_store
+ .mark_failed(
+ &durable_session.subagent_session_id,
+ &task_id,
+ error.to_string(),
+ )
+ .await
+ {
log::warn!(
"[subagent_reuse] mark_failed after driver registration error subagent_session_id={} task_id={} agent_id={} error={}",
durable_session.subagent_session_id,