Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Persist a retry of failed items after each item it stores

M3gA-Mind81ad8c107e98
diff --git a/crates/openhuman-core/src/memory/import.rs b/crates/openhuman-core/src/memory/import.rs
index 7bb051617b..b4e90337e4 100644
--- a/crates/openhuman-core/src/memory/import.rs
+++ b/crates/openhuman-core/src/memory/import.rs
@@ -570,6 +570,10 @@ async fn retry_run(workspace_dir: &Path, bound: &BoundEngine, mut file: ImportFi
Ok(_) => {
file.failed.retain(|failed| failed.id != id);
file.state.imported += 1;
+ file.state.failed = file.failed.len() as u64;
+ // Persisted per item, so a quit mid-retry keeps what
+ // was stored off the list instead of sending it again.
+ write_file(workspace_dir, &file);
}
Err(error) if skips_item(&error) => {
let again = FailedItem::new(&item, error);