Skip to content

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

chore: files changed crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs

Steven Enamakel7535c4966505
diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs
index 703e13c383..ef7feaffdc 100644
--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs
@@ -369,18 +369,17 @@ pub(super) fn assemble_turn_harness(
harness.push_middleware(mw.clone());
}
- // Repeated-failure circuit breaker: pause the run when a tool returns the same
- // error `REPEATED_TOOL_FAILURE_THRESHOLD` times in a row, so a deterministic
- // security/approval denial or terminal tool error surfaces its root cause
- // instead of burning the whole iteration budget (legacy ProgressGuard parity).
- // Side effects come from the tools' declarations (a timed-out read retries).
+ // Repeated-failure circuit breaker: pause the run when tool calls keep failing,
+ // so a denial or terminal tool error surfaces its root cause instead of burning
+ // the iteration budget. Side effects come from the tools' declarations.
let repeated_failure = handle.as_ref().map(|handle| {
+ let (threshold, facts) = (REPEATED_TOOL_FAILURE_THRESHOLD, tool_sets.clone());
let mw = middleware::RepeatedToolFailureMiddleware::new(
handle.clone(),
- REPEATED_TOOL_FAILURE_THRESHOLD,
+ threshold,
halt_summary.clone(),
);
- Arc::new(mw.with_tool_facts(middleware::tool_sets_lookup(tool_sets.clone())))
+ Arc::new(mw.with_tool_facts(middleware::tool_sets_lookup(facts)))
});
if let Some(mw) = &repeated_failure {
harness.push_middleware(mw.clone());