Skip to content

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

fix(orchestration): skip outcome recording for stopped or cancelled threads

Steven Enamakeld94c107e46d0
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
index e8debbf7f5..e2a75b0e79 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
@@ -193,7 +193,8 @@ pub(crate) fn record_outcome(
.lock()
.expect("background_completions queue poisoned");
if let Some(thread_id) = entry.parent_thread_id.as_deref() {
- if state.cancelled_threads.contains(thread_id) || state.stopped_threads.contains(thread_id) {
+ if state.cancelled_threads.contains(thread_id) || state.stopped_threads.contains(thread_id)
+ {
log::debug!(
"[background_completions] dropping completion task_id={} for stopped/cancelled thread_id={}",
entry.task_id,