Skip to content

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

fix(middleware): skip terminal failure detection for command exit reports

Steven Enamakel1119fa05d447
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 8874875419..6008195362 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
@@ -543,7 +543,10 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>
// *before* the count-based thresholds, because the orchestrator otherwise
// re-emits the doomed step under varied delegation-tool names so the
// identical-retry threshold never trips in time.
- if result.is_error {
+ // A command's exit report carries the program's output, which can quote
+ // a provider error (a script calling an API) without the agent's own
+ // inference having failed.
+ if result.is_error && !is_command_exit_report(&failure_text) {
if let Some(kind) = terminal_inference_failure_kind(&failure_text) {
tracing::warn!(
tool = tool_name,