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

Method subagent_task

sdk/python/src/lib.rs:1861–1869  ·  view source on GitHub ↗

Look up a delegated subagent task by id. Returns None when no such task has been observed in this session.

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

Source from the content-addressed store, hash-verified

1859 /// Look up a delegated subagent task by id. Returns None when no such
1860 /// task has been observed in this session.
1861 fn subagent_task(&self, py: Python<'_>, task_id: String) -> PyResult<PyObject> {
1862 let session = self.inner.clone();
1863 let snapshot =
1864 py.allow_threads(move || get_runtime().block_on(session.subagent_task(&task_id)));
1865 let json = serde_json::to_string(&snapshot).map_err(|e| {
1866 PyRuntimeError::new_err(format!("Failed to serialize subagent task: {e}"))
1867 })?;
1868 json_string_to_py(py, &json)
1869 }
1870
1871 /// Return snapshots of every delegated subagent task observed in this
1872 /// session (including completed and failed ones), oldest first.

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