Skip to content

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

fix(orchestration): await legacy session cancellation

Steven Enamakel30726f542208
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
index 603d89085a..62b16bdfc5 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/cancel.rs
@@ -52,7 +52,7 @@ pub(crate) async fn cancel_by_task_with_workspace_reason(
let Some(owner_scope) =
crate::agent::orchestration::completion_owners::driver_task_owner(ctx, task_id)
else {
- return terminal_legacy_session(ctx, &workspace_dir, task_id);
+ return terminal_legacy_session(ctx, &workspace_dir, task_id).await;
};
let Some(parent_thread_id) = owner_scope.parent_thread_id.as_deref() else {
return Ok(None);
@@ -187,7 +187,7 @@ pub(crate) async fn cancel_by_task_with_workspace_reason(
/// terminal host row, imports it into the scoped driver store, and returns the
/// driver's durable projection; live cancellation still requires the owner
/// registry.
-fn terminal_legacy_session(
+async fn terminal_legacy_session(
ctx: &crate::core::runtime::DispatchCtx,
workspace_dir: &Path,
task_id: &str,
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port.rs
index 6132f12259..843523d196 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port.rs
@@ -266,11 +266,6 @@ fn import_host_sessions(
.map_err(SubagentError::Persistence)?
.load()
.map_err(SubagentError::Persistence)?;
- let converter = OpenHumanTinySubagentSessionStore::new(
- workspace_dir.to_path_buf(),
- parent_session,
- parent_thread_id.map(str::to_owned),
- );
for row in legacy.into_iter().filter(|row| {
row.parent_session == parent_session && row.parent_thread_id.as_deref() == parent_thread_id
}) {