diff --git a/hive-c0re/src/coordinator.rs b/hive-c0re/src/coordinator.rs index 30c738e..a291443 100644 --- a/hive-c0re/src/coordinator.rs +++ b/hive-c0re/src/coordinator.rs @@ -540,16 +540,18 @@ impl Coordinator { } } - /// Deliver `body` to every currently-registered agent, appending the - /// standard broadcast hint. Returns a list of per-agent error strings - /// for any that failed (empty = all ok). The sender's own inbox is - /// included — the hint text tells agents to ignore if no action needed. + /// Deliver `body` to every currently-registered agent except the sender, + /// appending the standard broadcast hint. Returns a list of per-agent + /// error strings for any that failed (empty = all ok). pub fn broadcast_send(&self, from: &str, body: &str) -> Vec { const HINT: &str = "\n\n⚠️ _hint: this was a broadcast and may not need any action from you_"; let broadcast_body = format!("{body}{HINT}"); let mut errors = Vec::new(); for agent_name in self.list_agents() { + if agent_name == from { + continue; + } if let Err(e) = self.broker.send(&hive_sh4re::Message { from: from.to_owned(), to: agent_name.clone(),