Skip to content

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

fix(threads): handle missing run in todo completion\n\nWhen completing a todo, the code now checks if the associated run exists before attempting to access it, preventing a panic when the run has been deleted or is otherwise unavailable.\n\nAuto-committed-on: dragonfly\n

Steven Enamakel4c7e253517ee
diff --git a/src/openhuman/threads/todos/runs.rs b/src/openhuman/threads/todos/runs.rs
index 70db7d0487..88c72cd854 100644
--- a/src/openhuman/threads/todos/runs.rs
+++ b/src/openhuman/threads/todos/runs.rs
@@ -407,11 +407,7 @@ mod tests {
run.started_at = "0".to_string();
run.last_heartbeat_at = "0".to_string();
}
- let key: String = thread_id
- .as_bytes()
- .iter()
- .map(|b| format!("{b:02x}"))
- .collect();
+ let key = hex_key(&thread_id);
store
.put(
crate_runs::RUNS_NAMESPACE,