Skip to content

Unexpected output type, ignoring: <class 'openai.types.responses.response_output_item.McpCall'> #777

Closed
@codefromthecrypt

Description

@codefromthecrypt
Contributor

Describe the bug

I get this warning using HostedMCPTool in an agent

Unexpected output type, ignoring: <class 'openai.types.responses.response_output_item.McpCall'>

A clear and concise description of what the bug is.

Debug information

  • Agents SDK version: 0.0.16
  • Python version: 3.13.3

Repro steps

 OPENAI_API_KEY=sk-nottellin uv run -q  main.py 

main.py

# /// script
# requires-python = ">=3.13"
# dependencies = ["openai-agents~=0.0.16"]
# ///
import asyncio

from agents import Agent, HostedMCPTool, Runner


async def main():
    agent = Agent(
        name="Assistant",
        tools=[
            HostedMCPTool(
                tool_config={
                    "type": "mcp",
                    "server_label": "gitmcp",
                    "server_url": "https://gitmcp.io/elastic/elasticsearch",
                    "require_approval": "never",
                }
            )
        ],
    )

    res = await Runner.run(agent, "Which language is this repo written in?")
    print(res.final_output)


if __name__ == "__main__":
    asyncio.run(main())

Expected behavior

expect no warnings

Activity

added 2 commits that reference this issue on Jun 2, 2025

Fix openai#777 by handking MCPCall events in RunImpl

76d28b6

Fix openai#777 by handling MCPCall events in RunImpl

06c0fbc
added a commit that references this issue on Jun 2, 2025

Fix openai#777 by handling MCPCall events in RunImpl (openai#799)

3e7b286
added a commit that references this issue on Jun 10, 2025

Fix openai#777 by handling MCPCall events in RunImpl (openai#799)

a4a0d4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @codefromthecrypt

      Issue actions

        Unexpected output type, ignoring: <class 'openai.types.responses.response_output_item.McpCall'> · Issue #777 · openai/openai-agents-python