Skip to content

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

chore(subagent): remove debug cancel logging and export workspace-aware cancel

Steven Enamakela4ee05341104
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
index 29938a8b79..d42ef30e0b 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
@@ -67,8 +67,8 @@ pub(crate) use cancel::prune;
#[cfg(test)]
pub(crate) use cancel::{caller_workspace_in, CallerWorkspace};
pub(crate) use cancel::{
- cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_for_thread, stop_for_thread,
- CancelledSubagent,
+ cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_by_task_with_workspace,
+ cancel_for_thread, stop_for_thread, CancelledSubagent,
};
pub(crate) use registry::admit_spawn;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 4ba2c3d8ec..c09a531e02 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -472,16 +472,6 @@ async fn invoke_driver_tool_with_request(
&parent_session,
thread_id.as_deref(),
);
- if std::env::var_os("OPENHUMAN_DEBUG_DRIVER_CANCEL").is_some() {
- let core = dispatch_ctx.resolved();
- eprintln!(
- "SPAWN_CTX core={:?} workspace={:?} agent={:?} parent_session={parent_session:?} thread={thread_id:?} owner={owner:?} jobs={:?}",
- core.as_deref().map(|core| core as *const _),
- core.as_ref().and_then(|core| core.workspace_dir().ok()),
- core.as_ref().and_then(|core| core.session_agent().map(str::to_owned)),
- jobs.list().into_iter().map(|job| (job.id, job.agent, job.status)).collect::<Vec<_>>(),
- );
- }
let owner_scope: Arc<dyn Fn(u64) -> String + Send + Sync> = Arc::new(move |_| owner.clone());
let mut dispatcher = dispatcher
.with_job_registry(jobs)