{"record":{"id":"5c17c2af02c0e8d1","repo":"tinyhumansai/openhuman","slug":"agent-replay-list-active-runs-failed-e","errorCode":null,"errorMessage":"[agent] replay list_active_runs failed: {e}","messagePattern":"\\[agent\\] replay list_active_runs failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/tinyagents/replay/ops.rs","lineNumber":154,"sourceCode":"pub(crate) async fn list_active_runs(\n    workspace: &Path,\n    thread_id: Option<&str>,\n    root_run_id: Option<&str>,\n) -> anyhow::Result<Vec<HarnessRunStatus>> {\n    log::debug!(\n        \"[agent] replay list_active_runs thread_id={:?} root_run_id={:?}\",\n        thread_id,\n        root_run_id\n    );\n    let stores = open_session_stores(workspace);\n    let store = FileStatusStore::new(stores.kv);\n\n    let base = match (thread_id, root_run_id) {\n        (Some(thread), _) => store.list_by_thread(thread).await,\n        (None, Some(root)) => store.list_by_root(root).await,\n        (None, None) => store.list_active().await,\n    }\n    .map_err(|e| anyhow::anyhow!(\"[agent] replay list_active_runs failed: {e}\"))?;\n\n    let mut runs: Vec<HarnessRunStatus> = base.into_iter().filter(is_active).collect();\n    // If a caller supplied BOTH a thread and a root, the thread query drove the\n    // base list; narrow it to the requested root as well.\n    if thread_id.is_some() {\n        if let Some(root) = root_run_id {\n            runs.retain(|s| s.root_run_id.as_str() == root);\n        }\n    }\n\n    log::debug!(\"[agent] replay list_active_runs returned={}\", runs.len());\n    Ok(runs)\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use std::sync::Arc;","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/tinyagents/replay/ops.rs#L136-L172","documentation":"Enumerating harness runs from the file status store failed while listing by thread id, root run id, or all runs; the underlying store/IO error is wrapped and surfaced to the caller. Distinguishes storage failure from an empty result list — an empty Vec is a successful query.","triggerScenarios":"Thrown at src/openhuman/agent/tinyagents/replay/ops.rs:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the concrete IO or decode cause","Verify the workspace session store is readable and not locked by another process","Confirm the thread_id/root_run_id filters are well-formed identifiers","Retry after freeing any file locks or repairing the store"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}