sdk-python
sdk-python copied to clipboard
[BUG] Agent loop hang ong mcp tool use exception at streamable_http
Checks
- [x] I have updated to the lastest minor and patch version of Strands
- [x] I have checked the documentation and this is not expected behavior
- [x] I have searched ./issues and there are no duplicates of my issue
Strands Version
1.8.2
Python Version
3.13
Operating System
public.ecr.aws/docker/library/python:3.13-slim
Installation Method
pip
Steps to Reproduce
- Configure agent with MCPClient with
streamable_http - Start agent prompt with
stream_async - Abort MCP Server sse stream mid stream (unexpected error from MCP Server)
- Observe exception log reported from https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/streamable_http.py#L184-L187
- Agent hangs forever
Expected Behavior
- Bubble exception to allow exception capture, or retry tool use
Actual Behavior
- Agent hangs forever
Additional Context
No response
Possible Solution
No response
Related Issues
No response
Hi @jeffjen, im currently working on a fix for this issue, and tracking the progress as a part of this issue: https://github.com/strands-agents/sdk-python/issues/625
This fix was merged and this issue should no longer exist, so ill close this issue. Please re-open if you are still seeing it.