Skip to content

Python: [Bug]: GitHubCopilotAgent streaming silently drops tool execution events #4734

Closed

Description

Description

GitHubCopilotAgent.run(stream=True) silently drops TOOL_EXECUTION_START and TOOL_EXECUTION_COMPLETE session events. The event_handler in _stream_updates only handles ASSISTANT_MESSAGE_DELTA, SESSION_IDLE, and SESSION_ERROR — tool execution events fall through with no corresponding AgentResponseUpdate emitted.

This means consumers (e.g. DevUI) that iterate the ResponseStream never see function_call or function_result content during streaming, making it impossible to display tool usage in real time. The non-streaming path (send_and_wait) is unaffected since the SDK handles tool calls internally.

Code Sample

async with GitHubCopilotAgent(tools=[get_weather]) as agent:
    async for update in agent.run("What's the weather in Seattle?", stream=True):
        for content in update.contents:
            print(content.type)
            # Prints "text" deltas only — never prints "function_call" or "function_result"
            # Tool calls happen but are invisible to the consumer

Error Messages / Stack Traces

none

Package Versions

agent-framework-github-copilot: 1.0.0b260311, agent-framework-core: 1.0.0rc4

Python Version

3.12

Additional Context

All other agent implementations (OpenAI, Anthropic, Bedrock, Azure AI, Ollama) emit Content.from_function_call updates during streaming. The Copilot agent is the only one missing this behavior.

Metadata

Metadata

Labels

bugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)pythonUsage: [Issues, PRs], Target: Python

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions