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

Labels

mcpUsage: [Issues, PRs], Target: MCPpythonUsage: [Issues, PRs], Target: PythonreproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflow

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions