tinyhumansai/openhuman · error · anyhow::Error

[agent] replay list_active_runs failed

Error message

[agent] replay list_active_runs failed: {e}

What it means

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.

Solutions

  1. Check the wrapped error for the concrete IO or decode cause
  2. Verify the workspace session store is readable and not locked by another process
  3. Confirm the thread_id/root_run_id filters are well-formed identifiers
  4. Retry after freeing any file locks or repairing the store
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/tinyagents/replay/ops.rs:154 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/5c17c2af02c0e8d1. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/tinyagents/replay/ops.rs:154

pub(crate) async fn list_active_runs(
    workspace: &Path,
    thread_id: Option<&str>,
    root_run_id: Option<&str>,
) -> anyhow::Result<Vec<HarnessRunStatus>> {
    log::debug!(
        "[agent] replay list_active_runs thread_id={:?} root_run_id={:?}",
        thread_id,
        root_run_id
    );
    let stores = open_session_stores(workspace);
    let store = FileStatusStore::new(stores.kv);

    let base = match (thread_id, root_run_id) {
        (Some(thread), _) => store.list_by_thread(thread).await,
        (None, Some(root)) => store.list_by_root(root).await,
        (None, None) => store.list_active().await,
    }
    .map_err(|e| anyhow::anyhow!("[agent] replay list_active_runs failed: {e}"))?;

    let mut runs: Vec<HarnessRunStatus> = base.into_iter().filter(is_active).collect();
    // If a caller supplied BOTH a thread and a root, the thread query drove the
    // base list; narrow it to the requested root as well.
    if thread_id.is_some() {
        if let Some(root) = root_run_id {
            runs.retain(|s| s.root_run_id.as_str() == root);
        }
    }

    log::debug!("[agent] replay list_active_runs returned={}", runs.len());
    Ok(runs)
}

#[cfg(test)]
mod tests {
    use super::*;
    use std::sync::Arc;

View on GitHub (pinned to 7491200858)