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

Steven Enamakel0699577bc266
diff --git a/src/openhuman/threads/todos/runs.rs b/src/openhuman/threads/todos/runs.rs
index 75aa21019d..6ec8a374d9 100644
--- a/src/openhuman/threads/todos/runs.rs
+++ b/src/openhuman/threads/todos/runs.rs
@@ -515,6 +515,9 @@ mod tests {
#[tokio::test]
async fn scratch_location_returns_empty_runs() {
+ // Serialize against the process-global scratch store shared with
+ // `todos::ops` / agent-tool tests (see `scratch_test_lock`).
+ let _guard = ops::scratch_test_lock();
let runs = list_runs(&BoardLocation::Scratch, None).await.unwrap();
assert!(runs.is_empty());
}