(&self, id: &str)
| 404 | } |
| 405 | |
| 406 | async fn load_subagent_tasks(&self, id: &str) -> Result<Option<Vec<SubagentTaskSnapshot>>> { |
| 407 | let path = self.subagent_tasks_path(id); |
| 408 | if !path.exists() { |
| 409 | return Ok(None); |
| 410 | } |
| 411 | let json = fs::read_to_string(&path) |
| 412 | .await |
| 413 | .with_context(|| format!("Failed to read subagent tasks from {}", path.display()))?; |
| 414 | let tasks = serde_json::from_str(&json) |
| 415 | .with_context(|| format!("Failed to parse subagent tasks from {}", path.display()))?; |
| 416 | Ok(Some(tasks)) |
| 417 | } |
| 418 | |
| 419 | async fn save_loop_checkpoint(&self, run_id: &str, checkpoint: &LoopCheckpoint) -> Result<()> { |
| 420 | let path = self.loop_checkpoint_path(run_id); |
no test coverage detected