Skip to content

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

fix(subagent-host): skip inherited denials within channel ceiling

Steven Enamakelbcc8e5024acf
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
index 26d3b6ce9d..38e225cf75 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
@@ -623,6 +623,18 @@ pub(super) fn child_tool_policy(
) {
continue;
}
+ // A denial whose required level fits the channel's ceiling is not the
+ // channel's doing: it is the parent closing a pack it hands off to this
+ // very child (`close_handed_off_packs`), and inheriting it would strip
+ // the specialist of its own belt (`skill_setup` could neither search nor
+ // install). Only a denial above the channel ceiling narrows the child.
+ if decision.action == tinytools::ToolPolicyAction::Deny
+ && decision
+ .required_permission
+ .is_some_and(|required| required <= decision.allowed_permission)
+ {
+ continue;
+ }
session.decisions.insert(name.clone(), decision.clone());
session.allowed_tool_names.remove(name);
session.blocked_tool_names.insert(name.clone());