Skip to content

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

fix(agent): apply packed-tool filtering after wildcard synthesis

Steven Enamakel0a1034f4d270
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
index ffb2241529..7a72730f69 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
@@ -14,7 +14,6 @@ fn reconcile_surface_names(
discovery_deferred: Option<std::collections::HashSet<String>>,
strip_packed: impl FnOnce(&mut std::collections::HashSet<String>),
) {
- strip_packed(visible);
if let Some(names) = &discovery_deferred {
visible.retain(|name| !names.contains(name));
*deferred = names.clone();
@@ -25,7 +24,11 @@ fn reconcile_surface_names(
permanent: std::mem::take(permanent),
};
managed.refresh_synthesized(previous_synthesized, synthesized, auto_include_new);
- // Temporary baseline ordering for the required failing regression run.
+ // New wildcard-synthesized names must participate in packed-tool
+ // filtering so a withheld name can add its `use_skill` route. Restore
+ // permanent names afterward, preserving their precedence over both
+ // packed and deferred visibility filters.
+ strip_packed(&mut managed.visible);
managed.make_permanent(std::iter::empty::<String>());
if let Some(names) = &discovery_deferred {
managed.defer_visible(names);