Skip to content

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

fix(agent): remove stale synthesised tool specs before refresh

Steven Enamakelaaf7cc244c40
diff --git a/src/openhuman/agent/harness/session/turn/tools.rs b/src/openhuman/agent/harness/session/turn/tools.rs
index 97f3b438f6..80ff599eba 100644
--- a/src/openhuman/agent/harness/session/turn/tools.rs
+++ b/src/openhuman/agent/harness/session/turn/tools.rs
@@ -610,7 +610,7 @@ impl Agent {
// previous synthesised spec set, then append the fresh one.
{
let specs_vec = Arc::make_mut(&mut self.tool_specs);
- let _ = &old_synth;
+ specs_vec.retain(|s| !old_synth.contains(&s.name));
specs_vec.extend(synthed_specs);
}