[commenter abhinav-aegis]: @colaso96 Thanks a lot for picking this up! @ekzhu I am pretty sure I know what the issue is but I am completely tied up this week. However, I did a quick review and here are my comments and you are right it is to do with the tool message. ### Root Cause * **GraphFlow** was designed to support **multiple parallel speakers** at each step in the graph. * However, **BaseGroupChatManager** currently only implements a `select_speaker` method , which allows only **one speaker** to be selected at a time. * As a result, **GraphFlow currently returns only one** of the possible valid next speakers, based on the assumption that only one agent finishes at a time. * But as multiple speakers are allowed in principle by GraphFlow, to identify the agent that just finished execution, GraphFlow inspects the **last message** in the chat and extracts its source. * The problem arises when a **tool** used by the agent posts a message *after* the agent has responded , in that case, the last message is not authored by the agent, breaking the current logic. **See [[this line](https://github.com/microsoft/autogen/blob/87cf4f07dd865084074f5ab6ac6d3d3cda3c8995/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_graph/_digraph_group_chat.py#L258)] for the relevant code.** We look at the last message in the thread of messages and look for the source of this. --- ### 🛠️ Temporar

Context: Issue microsoft/autogen#6523 (closed, 38 comments): ### What happened? **Describe the bug** Graphflow doesnt seem to work as expected when an agent has access to tools. I get a runtime error mentioning that the agent is unable to find the next speaker even though that edge exists in the graph. **To Reproduce** I am looking to do something like this: ``` agents: - name: "spock_dataset" chat_engine_model: "gpt-4.1-mini" system_message: | Your task is to call the "query_muse_search" tool and return 2 possible datasets to use to answer the users question tools_allow_list: ["query_muse_search"] # - name: "spoc