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

Method pending_subagent_tasks

sdk/python/src/lib.rs:1883–1891  ·  view source on GitHub ↗

Return snapshots of subagent tasks still in `running` state.

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

Source from the content-addressed store, hash-verified

1881
1882 /// Return snapshots of subagent tasks still in `running` state.
1883 fn pending_subagent_tasks(&self, py: Python<'_>) -> PyResult<PyObject> {
1884 let session = self.inner.clone();
1885 let tasks =
1886 py.allow_threads(move || get_runtime().block_on(session.pending_subagent_tasks()));
1887 let json = serde_json::to_string(&tasks).map_err(|e| {
1888 PyRuntimeError::new_err(format!("Failed to serialize pending subagent tasks: {e}"))
1889 })?;
1890 json_string_to_py(py, &json)
1891 }
1892
1893 /// Cancel an in-flight subagent task by id. Returns True when a
1894 /// cancellation token was found and fired, False when the task id is

Callers 1

mainFunction · 0.45

Calls 4

json_string_to_pyFunction · 0.85
block_onMethod · 0.80
get_runtimeFunction · 0.70
cloneMethod · 0.45

Tested by 1

mainFunction · 0.36