{"record":{"id":"582ed19879237ed7","repo":"microsoft/semantic-kernel","slug":"function-call-required-but-no-function-steps-found","errorCode":null,"errorMessage":"Function call required but no function steps found for agent `{agent.name}` thread: {thread_id}.","messagePattern":"Function call required but no function steps found for agent `(.+?)` thread: (.+?)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/agents/azure_ai/agent_thread_actions.py","lineNumber":703,"sourceCode":"                elif event_type == AgentStreamEvent.THREAD_RUN_REQUIRES_ACTION:\n                    logger.debug(\n                        f\"Entering step type {event_type}, agent `{agent.name}` and \"\n                        f\"thread `{thread_id}` with event data: {event_data}\"\n                    )\n                    run = cast(ThreadRun, event_data)\n\n                    # Check if this is a function call request\n                    if isinstance(run.required_action, SubmitToolOutputsAction):\n                        action_result = await cls._handle_streaming_requires_action(\n                            agent_name=agent.name,\n                            kernel=kernel,\n                            run=run,\n                            function_steps=function_steps,\n                            arguments=arguments,\n                            function_choice_behavior=function_choice_behavior,\n                        )\n                        if action_result is None:\n                            raise RuntimeError(\n                                f\"Function call required but no function steps found for agent `{agent.name}` \"\n                                f\"thread: {thread_id}.\"\n                            )\n\n                        for content in (\n                            action_result.function_call_streaming_content,\n                            action_result.function_result_streaming_content,\n                        ):\n                            if content and output_messages is not None:\n                                if thread_msg_id and THREAD_MESSAGE_ID not in content.metadata:\n                                    content.metadata[THREAD_MESSAGE_ID] = thread_msg_id\n                                output_messages.append(content)\n\n                        handler: BaseAsyncAgentEventHandler = AsyncAgentEventHandler()\n                        await agent.client.agents.runs.submit_tool_outputs_stream(\n                            run_id=run.id,\n                            thread_id=thread_id,\n                            tool_outputs=action_result.tool_outputs,  # type: ignore","sourceCodeStart":685,"sourceCodeEnd":721,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/agents/azure_ai/agent_thread_actions.py#L685-L721","documentation":"Raised as a RuntimeError during streaming when a ThreadRun transitions to 'requires_action' with a SubmitToolOutputsAction, but _handle_streaming_requires_action returns None (no function call contents could be extracted from the run's required_action). The framework needs function steps to emit tool-call streaming content, so their absence is an internal inconsistency it cannot proceed past.","triggerScenarios":"Azure returns a requires_action run whose tool call payload is empty or shaped in a way get_function_call_contents cannot parse, so function_steps yields nothing and action_result is None.","commonSituations":"Azure SDK version producing a required_action structure the wrapper does not expect; a run that requires action but carries no tool calls (edge server behavior); partial/ malformed run object during streaming.","solutions":["Upgrade semantic-kernel and the azure-ai SDK to aligned versions so requires_action payloads are parsed correctly.","Disable auto function calling for the call if you do not need it, avoiding the requires_action path.","Inspect run.required_action at debug level to confirm the tool-call payload shape and report if it diverges from the wrapper's expectations."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    async for chunk in agent.invoke_stream(thread=thread):\n        ...\nexcept RuntimeError as e:\n    if 'no function steps found' in str(e):\n        logger.error('requires_action yielded no function steps; check azure-ai SDK compatibility')\n        # fall back to non-streaming invoke without auto function calling\n    raise","preventionTips":["Align semantic-kernel and azure-ai SDK versions so requires_action payloads parse.","Disable auto function calling if you do not rely on it, to avoid the requires_action path."],"tags":["azure-ai","streaming","function-calling","requires-action","semantic-kernel"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}