MCPcopy Index your code
hub / github.com/AI45Lab/Code / cancel_subagent_task

Method cancel_subagent_task

sdk/python/src/lib.rs:1896–1899  ·  view source on GitHub ↗

Cancel an in-flight subagent task by id. Returns True when a cancellation token was found and fired, False when the task id is unknown or the task already finished.

(&self, py: Python<'_>, task_id: String)

Source from the content-addressed store, hash-verified

1894 /// cancellation token was found and fired, False when the task id is
1895 /// unknown or the task already finished.
1896 fn cancel_subagent_task(&self, py: Python<'_>, task_id: String) -> bool {
1897 let session = self.inner.clone();
1898 py.allow_threads(move || get_runtime().block_on(session.cancel_subagent_task(&task_id)))
1899 }
1900
1901 /// Cancel a specific run only if it is still the active run.
1902 fn cancel_run(&self, py: Python<'_>, run_id: String) -> bool {

Callers 1

mainFunction · 0.45

Calls 3

block_onMethod · 0.80
get_runtimeFunction · 0.70
cloneMethod · 0.45

Tested by 1

mainFunction · 0.36