diff --git a/autogen/agentchat/conversable_agent.py b/autogen/agentchat/conversable_agent.py index 04c04f471f..0e950e190f 100644 --- a/autogen/agentchat/conversable_agent.py +++ b/autogen/agentchat/conversable_agent.py @@ -2179,7 +2179,12 @@ def check_termination_and_human_reply( config = self if messages is None: messages = self._oai_messages[sender] if sender else [] + + # if there are no messages, continue the conversation + if not messages: + return False, None message = messages[-1] + reply = "" no_human_input_msg = "" sender_name = "the sender" if sender is None else sender.name