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)
| 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 { |