Skip to content

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

chore(subagent_control): add debug logging for cancel handler

Steven Enamakel172b4596e698
diff --git a/crates/openhuman-core/src/agent_runs/subagent_control.rs b/crates/openhuman-core/src/agent_runs/subagent_control.rs
index b14a7f0ff1..8c3fe37a59 100644
--- a/crates/openhuman-core/src/agent_runs/subagent_control.rs
+++ b/crates/openhuman-core/src/agent_runs/subagent_control.rs
@@ -106,6 +106,21 @@ fn handle_subagent_cancel(ctx: DispatchCtx, params: Map<String, Value>) -> Contr
Box::pin(async move {
let cid = new_correlation_id();
let task_id = require_str(&params, "taskId")?;
+ if std::env::var_os("OPENHUMAN_DEBUG_DRIVER_CANCEL").is_some() {
+ eprintln!(
+ "CANCEL_HANDLER task={task_id:?} dispatch_core={:?} current_core={:?} default_core={:?} saas={}",
+ ctx.core()
+ .as_ref()
+ .map(std::sync::Arc::as_ptr),
+ crate::core::runtime::CoreContext::current()
+ .as_ref()
+ .map(std::sync::Arc::as_ptr),
+ crate::core::runtime::CoreContext::default_context()
+ .as_ref()
+ .map(std::sync::Arc::as_ptr),
+ crate::core::runtime::is_saas(),
+ );
+ }
let reason = opt_str(&params, "reason");
log::debug!(
target: "subagent_control_rpc",