Skip to content

Python: [Bug]: Orphaned mcp_call items cause HTTP 400 in multi-turn reasoning model flows #6883

Description

@csajmishra

Description

Problem highlighted in below issue has not been resolved for customer.
#6074

Code Sample

Attached the code sample used by client. 
[run_maf_workflow.txt](https://github.com/user-attachments/files/29597439/run_maf_workflow.txt)
[run_workflow.txt](https://github.com/user-attachments/files/29597438/run_workflow.txt)

Error Messages / Stack Traces

HTTP 400 — Item 'mcp_<id>' of type 'mcp_call' was provided without its
required 'reasoning' item: 'rs_<id>'.

Package Versions

agent-framework==1.8.0

Python Version

3.13

Additional Context

Issue is INTERMITTENT — does not fire on every run. We need to try 5-6 times to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythonreproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflowtriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions