sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

[BUG] Agent loop hang ong mcp tool use exception at streamable_http

Open jeffjen opened this issue 1 year ago • 2 comments

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

  1. Configure agent with MCPClient with streamable_http
  2. Start agent prompt with stream_async
  3. Abort MCP Server sse stream mid stream (unexpected error from MCP Server)
  4. Observe exception log reported from https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/streamable_http.py#L184-L187
  5. Agent hangs forever

Expected Behavior

  1. Bubble exception to allow exception capture, or retry tool use

Actual Behavior

  1. Agent hangs forever

Additional Context

No response

Possible Solution

No response

Related Issues

No response

jeffjen avatar Sep 18 '25 19:09 jeffjen

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

Unshure avatar Sep 23 '25 19:09 Unshure

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.

Unshure avatar Oct 06 '25 21:10 Unshure