diff --git a/main.go b/main.go index d435ca2..3d6f2d3 100644 --- a/main.go +++ b/main.go @@ -396,7 +396,10 @@ func (h *Hub) handleWS(w http.ResponseWriter, r *http.Request) { } } for _, name := range targets { - h.sendToAgent(msg, name, 999, true) + // Use direct=false for broadcasts/name-mentions so they route to + // the "agentchat" session, not "main" (avoids conflict with active + // webchat/Telegram sessions on the same agent). + h.sendToAgent(msg, name, 999, false) } } }