Skip to content

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

refactor(session_host): extract stop summary into its own module

Steven Enamakele30210b56eac
diff --git a/crates/openhuman-core/src/agent/session_host/stop_summary.rs b/crates/openhuman-core/src/agent/session_host/stop_summary.rs
index 428b1aaa11..d5fdf16548 100644
--- a/crates/openhuman-core/src/agent/session_host/stop_summary.rs
+++ b/crates/openhuman-core/src/agent/session_host/stop_summary.rs
@@ -177,7 +177,12 @@ impl StopReasonKind {
"uncertain_side_effect" => Self::UncertainSideEffect,
"authentication" => Self::Authentication,
"permission" => Self::Permission,
- "policy" => Self::Policy,
+ // `policy` is the user's denial; `blocked_by_policy` is the
+ // security policy refusing the call (read-only mode, a forbidden
+ // path). Both are the user's security settings, and the refusal
+ // used to fall through to `Generic` ("my tool calls were not
+ // getting anywhere").
+ "policy" | "blocked_by_policy" => Self::Policy,
"unsupported" | "missing_app" => Self::MissingProgram,
"not_found" | "missing_window" => Self::NotFound,
"validation" | "invalid_arguments" => Self::InvalidCalls,