Return snapshots of every delegated subagent task observed in this session (including completed and failed ones), oldest first.
(&self, py: Python<'_>)
| 1871 | /// Return snapshots of every delegated subagent task observed in this |
| 1872 | /// session (including completed and failed ones), oldest first. |
| 1873 | fn subagent_tasks(&self, py: Python<'_>) -> PyResult<PyObject> { |
| 1874 | let session = self.inner.clone(); |
| 1875 | let tasks = py.allow_threads(move || get_runtime().block_on(session.subagent_tasks())); |
| 1876 | let json = serde_json::to_string(&tasks).map_err(|e| { |
| 1877 | PyRuntimeError::new_err(format!("Failed to serialize subagent tasks: {e}")) |
| 1878 | })?; |
| 1879 | json_string_to_py(py, &json) |
| 1880 | } |
| 1881 | |
| 1882 | /// Return snapshots of subagent tasks still in `running` state. |
| 1883 | fn pending_subagent_tasks(&self, py: Python<'_>) -> PyResult<PyObject> { |