The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs,crates/
Steven Enamakele3f8c2aca7f9
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rsindex 468d319a8d..fcd8c628bf 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs@@ -107,11 +107,17 @@ pub(super) fn is_optional_service(tool: &str) -> bool {)}-/// Tools whose timeout has always been transient, kept as a floor under the-/// side-effect reading: a `web_fetch` declaring network access must not become-/// an uncertain action because its policy does not say `read_only`.+/// Read tools whose timeout is always transient, kept as a floor under the+/// side-effect reading for a call judged by name alone (no registered tool+/// facts, e.g. a dispatcher's unregistered target): a `web_fetch` declaring+/// network access must not become an uncertain action because its policy+/// does not say `read_only`, and `web_answer_tool` carries no reading verb.+/// Every entry is a production tool name; `web_search` was dropped when the+/// search tools became TinySearch's `web_*_tool` set.const ALWAYS_RETRYABLE_ON_TIMEOUT: &[&str] = &[- "web_search",+ "web_search_tool",+ "web_answer_tool",+ "web_contents_tool","web_fetch","file_read","list_files",@@ -238,7 +244,16 @@ pub(super) fn classified_recovery_policy(Some(match class {Class::MissingPermission => ("permission", 0),Class::BadCredentials => ("authentication", 0),- Class::BlockedByPolicy | Class::Denied | Class::ApprovalExpired => ("policy", 0),+ // The policy refused this call before the tool ran, and its refusal+ // names a narrower, permitted alternative (scope the path, a read+ // instead of a write). One alternative is the point of that copy:+ // halting on the refusal itself ended production turns after one+ // attempt. Its own class, so a refusal does not share a budget with+ // the user's denial, and a second refusal on the same operation and+ // scope still stops.+ Class::BlockedByPolicy => ("blocked_by_policy", 1),+ // The user said no, or never answered. Asking again only re-prompts.+ Class::Denied | Class::ApprovalExpired => ("policy", 0),// A shell command calling a program this host lacks (often a POSIX// tool on Windows) is a call the model can correct: one retry, with a// nudge naming the host OS and shell. Other tools keep zero.diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rsindex 487cfbdcd8..afca2621ab 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs@@ -434,6 +434,7 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>"authentication","site_refused","policy",+ "blocked_by_policy","unsupported","missing_window","missing_app",@@ -479,12 +480,17 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>| "uncertain_side_effect"| "unavailable"| "service_refused"+ | "blocked_by_policy") {let instruction = match class {"service_refused" => format!("The `{tool_name}` tool cannot be used in this session: the service refused the request ({}). Do not call `{tool_name}` again; continue with your other tools.",first_error_line(&failure_text)),+ "blocked_by_policy" => format!(+ "The `{tool_name}` call was blocked by policy and did not run ({}). Try one narrower, permitted alternative (a scoped path, a bounded command, a read instead of a write) or continue with other tools; do not resend it unchanged, and a second refusal ends the turn.",+ first_error_line(&failure_text)+ ),"validation" => "The last call failed validation. Correct its schema or arguments once before trying again.".to_owned(),"invalid_arguments" => format!("The `{tool_name}` call was rejected before it ran: its arguments did not match the tool's schema ({}). Read the tool's parameters and correct the call; do not resend it unchanged.",