Skip to content

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

refactor(tinyagents): simplify repeated failure middleware

Steven Enamakel40320d637736
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
index d0b227276c..c74a269c7d 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
@@ -411,6 +411,9 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>
_state: &(),
_run: &mut tinyagents_harness::middleware::AgentRun,
) -> TaResult<()> {
+ if let Ok(mut candidate) = self.repeat_candidate.lock() {
+ *candidate = None;
+ }
let own = self.own_halt.lock().ok().and_then(|mut own| own.take());
if let (Some(own), Ok(mut slot)) = (own, self.halt_summary.lock()) {
if slot.as_deref().is_some_and(|current| current != own) {