MCPcopy Create free account
hub / github.com/AI45Lab/Code / cancel_subagent_task

Method cancel_subagent_task

core/src/agent_api.rs:874–876  ·  view source on GitHub ↗

Cancel an in-flight delegated subagent task by id. Returns `true` when a cancellation token was found and fired, `false` when the task id is unknown or the task has already finished. The eventual `SubagentEnd` from the cancelled child loop won't downgrade the terminal status — it stays `Cancelled`.

(&self, task_id: &str)

Source from the content-addressed store, hash-verified

872 /// `SubagentEnd` from the cancelled child loop won't downgrade the
873 /// terminal status — it stays `Cancelled`.
874 pub async fn cancel_subagent_task(&self, task_id: &str) -> bool {
875 self.subagent_tasks.cancel(task_id).await
876 }
877
878 /// Return a shared handle to the session's subagent task tracker.
879 ///

Calls 1

cancelMethod · 0.45